[PATCH] CalculateSpillWeights does not need to be a pass

Based on discussions with Lang Hames and Jakob Stoklund Olesen at the hacker’s lab, and in the light of upcoming work on the PBQP register allocator, it was though that CalcSpillWeights does not need to be a pass. This change will enable to customize / tune the spill weight computation depending on the allocator.

Update the documentation style while there.

I also intend to take VirtRegAuxInfo out of line in a later patch as this is really a helper class for spill weight (re) computation.


0001-CalculateSpillWeights-does-not-need-to-be-a-pass.patch (10.1 KB)



Committed at r194269

Thanks Jakob !


I had to revert it as it made 3 tests fail (ppc, arm). I will investigate the failure when I will be back home — I have to catch my plane now :). Although there was no functional change intended, it changed register allocation on those targets. Removing the CalculateSpillWeight pass from the pipeline somehow affected the results of the pass pipeline on those targets. May be those tests’ checks just need to be fine tuned to be immune to register allocation changes.