By the way. This check is still not quite right. // Loads from stubs of global addresses are side effect free. if (Reg != 0 && MRegisterInfo::isVirtualRegister(Reg) &&
In dynamic-no-pic mode, Reg can be 0. So it should be Reg == 0 || ... Evan On Jan 5, 2008, at 3:37 PM, Bill Wendling wrote: > On Jan 5, 2008, at 2:49 AM, Evan Cheng wrote: >> On Jan 5, 2008, at 1:18 AM, Bill Wendling <[EMAIL PROTECTED]> wrote: >> >>> --- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original) >>> +++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Sat Jan 5 03:18:04 >>> 2008 >>> @@ -171,12 +171,15 @@ >>> case X86::MOV32rm: >>> if (MI->getOperand(1).isRegister()) { >>> unsigned Reg = MI->getOperand(1).getReg(); >>> + const X86Subtarget &ST = TM.getSubtarget<X86Subtarget>(); >>> >>> // Loads from global addresses which aren't redefined in the >>> function are >>> // side effect free. >>> if (Reg != 0 && >> >> I assume caller ensure this operant is side effect free? > > It ensures that all of the operands are loop-invariant. Reg is > defined outside of the loop at this point. > >> Can you change this to accept a list of operands which should be >> checked? For >> LICM, that means non-invariant operands. >> > I'm not sure why this is necessary. Like I said, all of the operands > should be loop-invariant at this point... > >> Also, please fix the comment. >> > Okay. > > -bw > _______________________________________________ > llvm-commits mailing list > llvm-commits@cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits