diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-04-01 23:26:12 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-04-01 23:26:12 +0000 |
commit | b86595fb0abaa9e1652c419ca941205be66af955 (patch) | |
tree | 39686c8d856b56b5ee3dba38da7267164e80f826 /llvm/lib | |
parent | 257520b1b4c64381bd2216613b0f69b956438528 (diff) | |
download | bcm5719-llvm-b86595fb0abaa9e1652c419ca941205be66af955.tar.gz bcm5719-llvm-b86595fb0abaa9e1652c419ca941205be66af955.zip |
ReMat of load from stub in pic mode extends the life of pic base. Currently spiller doesn't do a good job of estimating the impact. Disable for now.
llvm-svn: 49059
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index ffe20833228..c9de586e78d 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/lib/Target/X86/X86InstrInfo.cpp @@ -37,6 +37,10 @@ namespace { cl::desc("Print instructions that the allocator wants to" " fuse, but the X86 backend currently can't"), cl::Hidden); + cl::opt<bool> + ReMatPICStubLoad("remat-pic-stub-load", + cl::desc("Re-materialize load from stub in PIC mode"), + cl::init(false), cl::Hidden); } X86InstrInfo::X86InstrInfo(X86TargetMachine &tm) @@ -782,6 +786,8 @@ bool X86InstrInfo::isReallyTriviallyReMaterializable(MachineInstr *MI) const { if (BaseReg == 0) return true; // Allow re-materialization of PIC load. + if (!ReMatPICStubLoad && MI->getOperand(4).isGlobal()) + return false; MachineRegisterInfo &MRI = MI->getParent()->getParent()->getRegInfo(); bool isPICBase = false; for (MachineRegisterInfo::def_iterator I = MRI.def_begin(BaseReg), |