diff options
author | Dale Johannesen <dalej@apple.com> | 2008-04-01 20:00:57 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-04-01 20:00:57 +0000 |
commit | b6d5b1439047609c050576f3dc52b722e76bd30b (patch) | |
tree | 40d27805f206bbe0dbb4b11ec963fa0a4a026cdf /lib/Target | |
parent | 5a15814098702ea301e2f7ef045b12126c808eaf (diff) | |
download | external_llvm-b6d5b1439047609c050576f3dc52b722e76bd30b.tar.gz external_llvm-b6d5b1439047609c050576f3dc52b722e76bd30b.tar.bz2 external_llvm-b6d5b1439047609c050576f3dc52b722e76bd30b.zip |
Revert 49006 for the moment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49046 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/PowerPC/PPCAsmPrinter.cpp | 3 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCRegisterInfo.cpp | 7 | ||||
-rw-r--r-- | lib/Target/X86/X86AsmPrinter.cpp | 4 | ||||
-rw-r--r-- | lib/Target/X86/X86RegisterInfo.cpp | 8 |
4 files changed, 8 insertions, 14 deletions
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp index 4cc9d2a9bd..2537d67dda 100644 --- a/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/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/lib/Target/PowerPC/PPCRegisterInfo.cpp b/lib/Target/PowerPC/PPCRegisterInfo.cpp index cc3b583cc2..0e6bc69023 100644 --- a/lib/Target/PowerPC/PPCRegisterInfo.cpp +++ b/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) { diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp index e1bc65fc5d..98e7d9c1e8 100644 --- a/lib/Target/X86/X86AsmPrinter.cpp +++ b/lib/Target/X86/X86AsmPrinter.cpp @@ -381,9 +381,9 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) { O << "\n"; - if (TAI->doesSupportExceptionHandling() && MMI && !Subtarget->is64Bit()) { + if (ExceptionHandling && TAI->doesSupportExceptionHandling() && MMI && + !Subtarget->is64Bit()) { // 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/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp index 95026f281a..5cd2fbe35e 100644 --- a/lib/Target/X86/X86RegisterInfo.cpp +++ b/lib/Target/X86/X86RegisterInfo.cpp @@ -504,8 +504,6 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const { MachineModuleInfo *MMI = MFI->getMachineModuleInfo(); X86MachineFunctionInfo *X86FI = MF.getInfo<X86MachineFunctionInfo>(); MachineBasicBlock::iterator MBBI = MBB.begin(); - bool needsFrameInfo = (MMI && MMI->hasDebugInfo()) || - ExceptionHandling || !Fn->doesNotThrow(); // Prepare for frame info. unsigned FrameLabelId = 0; @@ -538,7 +536,7 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const { .addReg(FramePtr); NumBytes -= SlotSize; - if (needsFrameInfo) { + if (MMI && MMI->needsFrameInfo()) { // Mark effective beginning of when frame pointer becomes valid. FrameLabelId = MMI->NextLabelID(); BuildMI(MBB, MBBI, TII.get(X86::LABEL)).addImm(FrameLabelId).addImm(0); @@ -550,7 +548,7 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const { } unsigned ReadyLabelId = 0; - if (needsFrameInfo) { + if (MMI && MMI->needsFrameInfo()) { // Mark effective beginning of when frame pointer is ready. ReadyLabelId = MMI->NextLabelID(); BuildMI(MBB, MBBI, TII.get(X86::LABEL)).addImm(ReadyLabelId).addImm(0); @@ -609,7 +607,7 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const { } } - if (needsFrameInfo) { + if (MMI && MMI->needsFrameInfo()) { std::vector<MachineMove> &Moves = MMI->getFrameMoves(); const TargetData *TD = MF.getTarget().getTargetData(); |