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

Akira Hatanaka ahatanak at gmail.com
Mon May 2 17:31:31 PDT 2011


Does updateTerminator() need to be rewritten in order to implement the
changes you suggested (call LV->replaceKillInstruction)? Or can it be taken
care of just by adding code to the files in Target/Mips?

Also, is the generated code still correct if
-disable-phi-elim-edge-splitting is added to the command line options?

On Mon, May 2, 2011 at 5:00 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk>wrote:

>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110502/6a1ae5ab/attachment.html>


More information about the llvm-dev mailing list