[PATCH] D15302: [Greedy regalloc] Replace analyzeSiblingValues with something new [Part1]
Wei Mi via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 21 09:45:31 PDT 2016
wmi updated this revision to Diff 51175.
wmi added a comment.
Herald added a reviewer: tstellarAMD.
Quentin, I addressed most of your comments.
Major changes or changes needs to pay attention to:
1. Added the patch that hoist Spill inside of BB to earlier place when the src of the spill is killed. It is done in InlineSpiller::hoistSpillInsideBB. With this part of change, some test changes are removed.
2. I am not sure I made the exact change as you expect about where to put postOptimization.
3. I found there was a comment in my previous patch saying DeadRemat is non-null only when regalloc is Greedy. It was wrong. All kinds of register allocator share the same InlineSpiller logic, so DeadRemat and original eliminateDeadRemats (Now it is put into RegAllocBase::postOptimization and RegAllocPBQP::postOptimization) are also necessary for PBQP and Basic.
I also noticed hoistCopies can be improved further. I plan to address it in the following patch.
With HoistSpillHelper, We still need hoistCopies when split-spill-mode=Speed because after removing some redundent spills, the sources of those spills may be shrinked. But when I addressed the review comments, I also found there is case that removing redundent spills not only cannot shrink the source of redundent spills, but also lengthen the live range of dst of those spills. Since we don't depend on hoistCopies to remove redundent spills (HoistSpillHelper can do that work better), we can change hoistCopies to remove spills only when it can shrink the source of redundent spills or at least not lengthen the live range of dst of spills. I can possibly do that by removing hoistCopies and extend hoistSpillInsideBB to handle cases across BBs -- to hoist spill only when its source is killed.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 123096 bytes
Desc: not available
More information about the llvm-commits