[LLVMdev] Regalloc Refactoring

Evan Cheng 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  
> contain
> 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,
> WimmerRegAllocLinearScan.
>
> 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.

Ok.

> - 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  
> SHOULD
> 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. :-)

Evan

>
> -Roman
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> 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