Debugging info on # spills?

Dave Korn dk@artimi.com
Thu Apr 8 14:10:00 GMT 2004


> -----Original Message-----
> From: gcc-owner On Behalf Of Michael Matz
> Sent: 08 April 2004 14:37

> But that doesn't say anything about the cost of the added 
> spill code.  In 
> the new-ra branch I have some small dumper which basically 
> counts the cost 
> of all stack related loads and stores.  Under the premise that it is 
> constant before register allocation it gives at least some 
> relatively sane 
> number about the quality of allocation.
> 
> 
> Ciao,
> Michael.


  Knowing that one compilation has three spills and another compilation only
has one spill doesn't tell you anything much: if the three spills are in
initialisation code and the one spill is in the middle of a loop that's
executed a hundred million times, the one spill costs that much more than
the three.  So 'number of spills' isn't a very useful metric because the
cost of a single spill can vary almost infinitely, depending on context.
Dunno if your dumping code could use information from the loop unroller / IV
analysis to make a better estimate of spill cost?


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....



More information about the Gcc mailing list