[llvm-commits] [llvm] r49054 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
Evan Cheng
evan.cheng at apple.com
Tue Apr 1 14:38:20 PDT 2008
Author: evancheng
Date: Tue Apr 1 16:38:20 2008
New Revision: 49054
URL: http://llvm.org/viewvc/llvm-project?rev=49054&view=rev
Log:
Remove unnecessary and non-deterministic checking code. Re-enable remat of load from gv stub.
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=49054&r1=49053&r2=49054&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Tue Apr 1 16:38:20 2008
@@ -752,10 +752,7 @@
/// isGVStub - Return true if the GV requires an extra load to get the
/// real address.
static inline bool isGVStub(GlobalValue *GV, X86TargetMachine &TM) {
- return false;
- /* Temporarily disabled.
return TM.getSubtarget<X86Subtarget>().GVRequiresExtraLoad(GV, TM, false);
- */
}
bool X86InstrInfo::isReallyTriviallyReMaterializable(MachineInstr *MI) const {
@@ -1828,15 +1825,7 @@
MI->getOperand(0).getReg() == MI->getOperand(1).getReg()) {
OpcodeTablePtr = &RegOp2MemOpTable2Addr;
isTwoAddrFold = true;
- // Can't write back to CPI or a GV stub.
- if (MOs[3].isCPI() ||
- (MOs[3].isGlobal() && isGVStub(MOs[3].getGlobal(), TM)))
- return NULL;
} else if (i == 0) { // If operand 0
- // Can't write back to CPI or a GV stub.
- if (MOs[3].isCPI() ||
- (MOs[3].isGlobal() && isGVStub(MOs[3].getGlobal(), TM)))
- return NULL;
if (MI->getOpcode() == X86::MOV16r0)
NewMI = MakeM0Inst(*this, X86::MOV16mi, MOs, MI);
else if (MI->getOpcode() == X86::MOV32r0)
More information about the llvm-commits
mailing list