diff options
Diffstat (limited to 'gnu/llvm/lib/Target/X86/X86CallFrameOptimization.cpp')
| -rw-r--r-- | gnu/llvm/lib/Target/X86/X86CallFrameOptimization.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gnu/llvm/lib/Target/X86/X86CallFrameOptimization.cpp b/gnu/llvm/lib/Target/X86/X86CallFrameOptimization.cpp index b16fa76c73f..78bd2add8c3 100644 --- a/gnu/llvm/lib/Target/X86/X86CallFrameOptimization.cpp +++ b/gnu/llvm/lib/Target/X86/X86CallFrameOptimization.cpp @@ -100,7 +100,7 @@ private: const X86RegisterInfo &RegInfo, DenseSet<unsigned int> &UsedRegs); - const char *getPassName() const override { return "X86 Optimize Call Frame"; } + StringRef getPassName() const override { return "X86 Optimize Call Frame"; } const TargetInstrInfo *TII; const X86FrameLowering *TFL; @@ -129,7 +129,7 @@ bool X86CallFrameOptimization::isLegal(MachineFunction &MF) { // in the compact unwind encoding that Darwin uses. So, bail if there // is a danger of that being generated. if (STI->isTargetDarwin() && - (!MF.getMMI().getLandingPads().empty() || + (!MF.getLandingPads().empty() || (MF.getFunction()->needsUnwindTableEntry() && !TFL->hasFP(MF)))) return false; @@ -175,7 +175,7 @@ bool X86CallFrameOptimization::isProfitable(MachineFunction &MF, // This transformation is always a win when we do not expect to have // a reserved call frame. Under other circumstances, it may be either // a win or a loss, and requires a heuristic. - bool CannotReserveFrame = MF.getFrameInfo()->hasVarSizedObjects(); + bool CannotReserveFrame = MF.getFrameInfo().hasVarSizedObjects(); if (CannotReserveFrame) return true; @@ -225,7 +225,7 @@ bool X86CallFrameOptimization::runOnMachineFunction(MachineFunction &MF) { assert(isPowerOf2_32(SlotSize) && "Expect power of 2 stack slot size"); Log2SlotSize = Log2_32(SlotSize); - if (!isLegal(MF)) + if (skipFunction(*MF.getFunction()) || !isLegal(MF)) return false; unsigned FrameSetupOpcode = TII->getCallFrameSetupOpcode(); @@ -340,10 +340,10 @@ void X86CallFrameOptimization::collectCallInfo(MachineFunction &MF, return; } - // For globals in PIC mode, we can have some LEAs here. - // Ignore them, they don't bother us. + // Skip over DEBUG_VALUE. + // For globals in PIC mode, we can have some LEAs here. Skip them as well. // TODO: Extend this to something that covers more cases. - while (I->getOpcode() == X86::LEA32r) + while (I->getOpcode() == X86::LEA32r || I->isDebugValue()) ++I; unsigned StackPtr = RegInfo.getStackRegister(); |
