[LLVMdev] Question about VNInfo updates by LiveIntervals::addIntervalsForSpills

Evan Cheng evan.cheng at apple.com
Fri Jan 30 14:26:56 PST 2009


On Jan 30, 2009, at 10:18 AM, Roman Levenstein wrote:

> Hi,
>
> It looks like LiveIntervals::addIntervalsForSpills does not update all
> of the LiveIntervals infos quite correctly.

Correct.

>
>
> In particular, if a live interval L is defined by Reg<-Reg copy
> instructions whose srcReg is later spilled by the
> addIntervalsForSpills() function, its VNInfo information is not
> updated in a proper way. It still points to the same MachineInstr as
> before, even though the MachineInstr was rewritten by
> addIntervalsForSpills(). This may lead to some problems during
> coalescing attempts after spilling (I'm trying to do coalescing in an
> iterative way), because the assertion in the
> LiveIntervals::getVNInfoSourceReg() fails due to the fact that the
> copy instruction defining the VNInfo of the live interval L is not a
> Reg<-Reg move any more. It is a Reg<-Mem move after spilling function
> invocation.

The current implementation simply does not support this. If you want  
to do iterative coalescing like this, I would recommend you write a  
different addIntervalsForSpills. The current version is too  
complicated as it is.

Evan

>
>
> How should such a situation with VNInfos be handled in a proper way?
> Any suggestions?
>
> Thanks,
>  -Roman
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list