[LLVMdev] Regalloc Refactoring
evan.cheng at apple.com
Wed Apr 18 10:37:33 PDT 2007
On Apr 17, 2007, at 11:57 PM, Roman Levenstein wrote:
> While implementing Wimmer's linear scan, which is heavily based on
> splitting of live intervals, I already extended LiveInterval to
> more detailed info about all def-use occurrences. I also implemented
> the functionality for splitting a live interval at any place.
> Additionally, the logic for selecting an "optimal" splitting position
> is done according to Wimmer's paper.
Great. It may be that your changes can be absorbed to help with our
short term needs.
> Classes that I changed were: LiveInterval, LiveIntervalAnalysis,
> RegAllocLinearScan. To avoid conflicts with recent changes by Evan, I
> did the modifications on my copies of these classes which I named
> WimmerLiveInterval, WimmerLiveIntervalAnalysis,
> I'm currently working on documenting the code and adding comments as
> well as some refactoring to make it cleaner. I plan to contribute the
> code rather soon, hopefully in May. In case of interest, I could post
> the code for my WimmerLiveInterval and WimmerLiveIntervalAnalysis
> classes even earlier.
> - Better handling of memory folding - Wimmer's linear scan does it
> during register allocation time and only conditionally, and not in
> LiveIntervalAnalysis as it is done now. It distinguishes between
> and MUST occurrences of the register in instructions. But current LLVM
> infrastructure for memory folding does it unconditionally. This
> requires probably some minor changes, e.g. providing different
> functions for asking if folding is potentially possible and for doing
> memory folding later, if the decision to do so is taken.
Folding decision is done during register allocation. It's just
unfortunate addIntervalsForSpills() is in LiveIntervalAnalysis.
Hopefully the refactoring work can fix this. :-)
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev