[llvm-commits] [llvm] r45626 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp

Bill Wendling isanbard at gmail.com
Sat Jan 5 15:37:00 PST 2008


On Jan 5, 2008, at 2:49 AM, Evan Cheng wrote:
> On Jan 5, 2008, at 1:18 AM, Bill Wendling <isanbard at gmail.com> 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



More information about the llvm-commits mailing list