[llvm-commits] [llvm] r49059 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
Evan Cheng
evan.cheng at apple.com
Tue Apr 1 16:26:12 PDT 2008
Author: evancheng
Date: Tue Apr 1 18:26:12 2008
New Revision: 49059
URL: http://llvm.org/viewvc/llvm-project?rev=49059&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=49059&r1=49058&r2=49059&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Tue Apr 1 18:26:12 2008
@@ -37,6 +37,10 @@
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 @@
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),
More information about the llvm-commits
mailing list