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

Chris Lattner clattner at apple.com
Sun Sep 21 16:41:33 PDT 2008


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




More information about the llvm-commits mailing list