[LLVMdev] LiveInterval Splitting & SubRegisters
Evan Cheng
evan.cheng at apple.com
Wed Jan 23 00:01:17 PST 2008
On Jan 22, 2008, at 12:23 PM, David Greene wrote:
> Evan,
>
> Can you explain the basic mechanics of the live interval splitting
> code?
> Is it all in LiveIntervalAnalysis.cpp under addIntervalsForSpills
> and child
> routines? What is it trying to do?
It's splitting live intervals that span multiple basic blocks. That
is, when an interval is spilled, it introduce a single reload per
basic block and retarget all the uses to use the result of the single
reload. It does not (yet) split intra-bb intervals.
>
> Also, in the ancient subregister coalescing code, there used to be
> an update
> of the SSARegMap to point subregisters to the superregister they were
> coalesced to (IIRC). That has since gone away. I used to use that
> in my
> code to return the correct live interval for a virtual register in
> the case
> where a subregister extract was coalesced.
Right. That has been removed because it's surprisingly painful to
maintain that information. Now subreg index lives on MachineOperand.
>
> That information appears to now be in RegSubIdxMap, which is local to
> runOnMachineFunction, so it's lost after the coalescer runs. Do I
> not need
> to worry about this information anymore?
That's used at the end of coalescing to rewrite virtual registers.
It's purely local information.
Evan
>
> Thanks.
>
> -Dave
> _______________________________________________
> 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