Spiller::Spill( LiveInterval *li, SmallVectorImpl<LiveInterval*> &newIntervals, const SmallVectorImpl<LiveInterval*> &spillIs ); has two reference vectors which contain a small list of Live Intervals. What is the register allocator's job to do with these intervals other than analysis. What more needed other than to know they exist? - Thanks - Jeff Kunkel -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110120/86c62ea6/attachment.html>
David A. Greene
2011-Jan-21 23:11 UTC
[LLVMdev] [LLVMDev] Reg Alloc: Spiller::Spill question
Jeff Kunkel <jdkunk3 at gmail.com> writes:> Spiller::Spill( LiveInterval *li, > SmallVectorImpl<LiveInterval*> &newIntervals, > const SmallVectorImpl<LiveInterval*> &spillIs ); > > has two reference vectors which contain a small list of Live > Intervals. What is the register allocator's job to do with these > intervals other than analysis. What more needed other than to know > they exist?It's been a while since I looked at this, so Evan can correct any mistakes I make. :) spillIs is passed into the spiller and indicates the intervals that alias the interval being spilled. In other words, they indicate registers that are sub-/super-registers of the one being spilled. These intervals must be spilled along with the "primary" one. I think this comes into play in linear scan when it has to force a reallocation of a physical register and must backtrack. The details of this are very fuzzy to me. The newIntervals vector gets filled in by LiveIntervalAnalysis with the new intervals created when spilling in done. Spilling is essentially a splitting of a live interval into multiple sub-intervals. Those sub-intervals will need to be allocated to registers. The newIntervals output tells the register allocator the new intervals it must add to its work queue. -Dave
Thanks, I think I have figured it out. However, I moved on to SplitEditor class. It was quite well done; I must say. Although the SpillAnalysis is a bit heavy-weight for the stuff I would like to do. - Jeff On Fri, Jan 21, 2011 at 6:11 PM, David A. Greene <greened at obbligato.org>wrote:> Jeff Kunkel <jdkunk3 at gmail.com> writes: > > > Spiller::Spill( LiveInterval *li, > > SmallVectorImpl<LiveInterval*> &newIntervals, > > const SmallVectorImpl<LiveInterval*> &spillIs > ); > > > > has two reference vectors which contain a small list of Live > > Intervals. What is the register allocator's job to do with these > > intervals other than analysis. What more needed other than to know > > they exist? > > It's been a while since I looked at this, so Evan can correct any > mistakes I make. :) > > spillIs is passed into the spiller and indicates the intervals that > alias the interval being spilled. In other words, they indicate > registers that are sub-/super-registers of the one being spilled. These > intervals must be spilled along with the "primary" one. > > I think this comes into play in linear scan when it has to force a > reallocation of a physical register and must backtrack. The details of > this are very fuzzy to me. > > The newIntervals vector gets filled in by LiveIntervalAnalysis with the > new intervals created when spilling in done. Spilling is essentially a > splitting of a live interval into multiple sub-intervals. Those > sub-intervals will need to be allocated to registers. The newIntervals > output tells the register allocator the new intervals it must add to its > work queue. > > -Dave >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110121/3b9ad9d5/attachment.html>
Seemingly Similar Threads
- [LLVMdev] [LLVMDev] Reg Alloc: Spiller::Spill question
- [LLVMdev] Register allocation questions
- [LLVMdev] Spillers
- Tweaking the Register Allocator's spill placement
- [LLVMdev] Register pressure mechanism in PRE or Smarter rematerialization/split/spiller/coalescing ?