[LLVMdev] LiveVariables not updated in MachineBasicBlock::SplitCriticalEdge?

Jakob Stoklund Olesen stoklund at 2pi.dk
Mon May 2 17:00:12 PDT 2011


On May 2, 2011, at 3:51 PM, Akira Hatanaka wrote:

> - vreg81's VarInfo:
>   Alive in blocks: 5, 6, 7, 8, 10, 12, 13, 19, 
>   Killed by:
>     #0: J <BB#17>
> 
> 
> As you can see, VarInfo vreg81 is killed by the unconditional jump instruction of BB#20 when it should be killed by the newly created conditional branch in BB#14 (BEQ). Is this a bug in updateTerminator() or is the back-end responsible for updating LiveVariables?  

This could be a new issue. Neither ARM nor x86 have conditional branches that take live register operands, so I don't think anyone has considered if the back-end should update LiveVariables. It simply hasn't come up before.

I think the target should call LV->replaceKillInstruction() when this happens.

/jakob




More information about the llvm-dev mailing list