[llvm-commits] [patch] Improve register coalescing

Evan Cheng evan.cheng at apple.com
Thu Jun 30 15:35:00 PDT 2011


Please watch performance changes (beyond just js) carefully. More coalescing doesn't always equal better performance. I think greedy regalloc is going to be able to handle anything the coalescer throws its way, but let's be careful still.

Evan

On Jun 30, 2011, at 3:28 PM, Rafael Ávila de Espíndola wrote:

>>> The real solution I think would be to turn the coalescing algorithm
>>> upside down: instead of trying to merge registers one pair at a time,
>>> start by assuming that every copy related register can be merged and
>>> try to show it cannot.
>> 
>> That sounds hard to get right.
> 
> True. The difference just reminded me of regular X strong dead code 
> elimination.
> 
>>> BB1:
>>> X = B
>>> Y = A
>>> 
>>> BB2:
>>> A = X
>>> B = Y
>>> 
>>> A and B can be merged if X and Y can be merged and X and Y can be
>>> merge if A and B can be merged.
>> 
>> I think we already detect and remove this kind of PHI loops?
> 
> Cool. If we do then just following copy definitions should get almost 
> all of the cases. I might give it a try on Firefox and see if it makes a 
> difference.
> 
>> /jakob
>> 
> 
> Cheers,
> Rafael
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list