[llvm-commits] [llvm] r98023 - /llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Mar 17 07:25:13 PDT 2010


On Mar 16, 2010, at 11:19 PM, Evan Cheng wrote:
>> On Mar 16, 2010, at 6:37 PM, Jakob Stoklund Olesen wrote:

>>> Ideally, I want to avoid physreg joining altogether, and use better hinting instead. Half of the coalescer would go away, and all of the bugs ;-)
> 
> That's the proper way to fix this. But we are ready to just do this yet. At least not with the short comings of linear scan.

Do we know what those shortcomings are?

My plan is to calculate hints at the same time as spill weights, instead of during coalescing. That allows a weighted vote in case there are multiple physreg copies of the same vreg. (Right now, the vote goes to whatever physreg was seen last.)

Second, I want to recalculate hints (and possibly spill weights) after breaking up a live interval for spilling.

In a perfect world, we could eliminate the trivial coalescing pass after register allocation too.

One problem is that linear scan resets the hints when it is backtracking, are there others?

/jakob





More information about the llvm-commits mailing list