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

Evan Cheng evan.cheng at apple.com
Wed Oct 15 17:40:53 PDT 2008


It read / mod / write the super-register. I think what LiveVariable  
does is adding an implicit use (and kill) of the same register.

Please change the name of AliasSet to something more appropriate.

Thanks,

Evan

On Oct 15, 2008, at 5:11 PM, Dan Gohman wrote:

> Author: djg
> Date: Wed Oct 15 19:11:23 2008
> New Revision: 57614
>
> URL: http://llvm.org/viewvc/llvm-project?rev=57614&view=rev
> Log:
> Fix a subtle bug in DeadMachineInstructionElim's liveness
> computation. A def of a register doesn't necessarily kill
> live super-registers.
>
> 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=57614&r1=57613&r2=57614&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp (original)
> +++ llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp Wed Oct 15  
> 19:11:23 2008
> @@ -126,7 +126,10 @@
>           unsigned Reg = MO.getReg();
>           if (Reg != 0 &&  
> TargetRegisterInfo::isPhysicalRegister(Reg)) {
>             LivePhysRegs.reset(Reg);
> -            for (const unsigned *AliasSet = TRI->getAliasSet(Reg);
> +            // Check the subreg set, not the alias set, because a def
> +            // of a super-register may still be partially live after
> +            // this def.
> +            for (const unsigned *AliasSet = TRI- 
> >getSubRegisters(Reg);
>                  *AliasSet; ++AliasSet)
>               LivePhysRegs.reset(*AliasSet);
>           }
>
>
> _______________________________________________
> 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