diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2021-12-02 21:49:08 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2022-06-04 11:59:04 +0000 |
| commit | 574b7079b96703a748f89ef5adb7dc3e26b8f7fc (patch) | |
| tree | 195000196b1e0cc13dea43258fa240e006f48184 /contrib/llvm-project/llvm/lib/Target/X86/X86DynAllocaExpander.cpp | |
| parent | 1f6fd64fe9c996b4795ee4a6c66b8f9216747560 (diff) | |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Target/X86/X86DynAllocaExpander.cpp')
| -rw-r--r-- | contrib/llvm-project/llvm/lib/Target/X86/X86DynAllocaExpander.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86DynAllocaExpander.cpp b/contrib/llvm-project/llvm/lib/Target/X86/X86DynAllocaExpander.cpp index df8df1e3a65d..c8ceebb8b8e6 100644 --- a/contrib/llvm-project/llvm/lib/Target/X86/X86DynAllocaExpander.cpp +++ b/contrib/llvm-project/llvm/lib/Target/X86/X86DynAllocaExpander.cpp @@ -212,6 +212,12 @@ void X86DynAllocaExpander::lower(MachineInstr *MI, Lowering L) { bool Is64BitAlloca = MI->getOpcode() == X86::DYN_ALLOCA_64; assert(SlotSize == 4 || SlotSize == 8); + Optional<MachineFunction::DebugInstrOperandPair> InstrNum = None; + if (unsigned Num = MI->peekDebugInstrNum()) { + // Operand 2 of DYN_ALLOCAs contains the stack def. + InstrNum = {Num, 2}; + } + switch (L) { case TouchAndSub: { assert(Amount >= SlotSize); @@ -251,7 +257,7 @@ void X86DynAllocaExpander::lower(MachineInstr *MI, Lowering L) { // Do the probe. STI->getFrameLowering()->emitStackProbe(*MBB->getParent(), *MBB, MI, DL, - /*InProlog=*/false); + /*InProlog=*/false, InstrNum); } else { // Sub BuildMI(*MBB, I, DL, |
