diff options
Diffstat (limited to 'llvm/lib/Target/PowerPC')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp | 7 |
2 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp index 4cc9d2a9bd5..2537d67ddaa 100644 --- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -1086,9 +1086,8 @@ bool DarwinAsmPrinter::doFinalization(Module &M) { O << "\n"; - if (TAI->doesSupportExceptionHandling() && MMI) { + if (ExceptionHandling && TAI->doesSupportExceptionHandling() && MMI) { // Add the (possibly multiple) personalities to the set of global values. - // Only referenced functions get into the Personalities list. const std::vector<Function *>& Personalities = MMI->getPersonalities(); for (std::vector<Function *>::const_iterator I = Personalities.begin(), diff --git a/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp b/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp index cc3b583cc27..0e6bc69023d 100644 --- a/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp +++ b/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp @@ -20,7 +20,6 @@ #include "PPCFrameInfo.h" #include "PPCSubtarget.h" #include "llvm/Constants.h" -#include "llvm/Function.h" #include "llvm/Type.h" #include "llvm/CodeGen/ValueTypes.h" #include "llvm/CodeGen/MachineInstrBuilder.h" @@ -947,8 +946,6 @@ PPCRegisterInfo::emitPrologue(MachineFunction &MF) const { MachineBasicBlock::iterator MBBI = MBB.begin(); MachineFrameInfo *MFI = MF.getFrameInfo(); MachineModuleInfo *MMI = MFI->getMachineModuleInfo(); - bool needsFrameInfo = (MMI && MMI->hasDebugInfo()) || - ExceptionHandling || !MF.getFunction()->doesNotThrow(); // Prepare for frame info. unsigned FrameLabelId = 0; @@ -1022,7 +1019,7 @@ PPCRegisterInfo::emitPrologue(MachineFunction &MF) const { unsigned TargetAlign = MF.getTarget().getFrameInfo()->getStackAlignment(); unsigned MaxAlign = MFI->getMaxAlignment(); - if (needsFrameInfo) { + if (MMI && MMI->needsFrameInfo()) { // Mark effective beginning of when frame pointer becomes valid. FrameLabelId = MMI->NextLabelID(); BuildMI(MBB, MBBI, TII.get(PPC::LABEL)).addImm(FrameLabelId).addImm(0); @@ -1098,7 +1095,7 @@ PPCRegisterInfo::emitPrologue(MachineFunction &MF) const { } } - if (needsFrameInfo) { + if (MMI && MMI->needsFrameInfo()) { std::vector<MachineMove> &Moves = MMI->getFrameMoves(); if (NegFrameSize) { |