[llvm-commits] [llvm] r56310 - /llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp

Evan Cheng evan.cheng at apple.com
Sun Sep 21 19:42:03 PDT 2008


This happens before livevariables. Remember we don't run LV at -O0.

Evan

On Sep 21, 2008, at 4:41 PM, Chris Lattner wrote:

>
> On Sep 18, 2008, at 11:22 AM, Dan Gohman wrote:
>
>> Author: djg
>> Date: Thu Sep 18 13:22:32 2008
>> New Revision: 56310
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=56310&view=rev
>> Log:
>> Don't consider instructions with implicit physical register
>> defs to be necessarily live.
>
> Why do defs of physical registers even matter?  Can't you just look at
> kill/dead markers?
>
> -Chris
>
>>
>>
>> Modified:
>>   llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp
>>
>> Modified: llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp?rev=56310&r1=56309&r2=56310&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp Thu Sep 18
>> 13:22:32 2008
>> @@ -64,7 +64,8 @@
>>          const MachineOperand &MO = MI->getOperand(i);
>>          if (MO.isRegister() && MO.isDef()) {
>>            unsigned Reg = MO.getReg();
>> -            if (TargetRegisterInfo::isPhysicalRegister(Reg) ||
>> +            if ((!MO.isImplicit() &&
>> +                 TargetRegisterInfo::isPhysicalRegister(Reg)) ||
>>                !MRI.use_empty(Reg)) {
>>              // This def has a use. Don't delete the instruction!
>>              AllDefsDead = false;
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list