count in spill_regs

Vladimir Makarov vmakarov@redhat.com
Mon Apr 2 16:36:00 GMT 2018



On 03/28/2018 05:31 PM, Sirish Pande wrote:
> Hi,
>
> I am interested to know if there is any option that would tell me how many
> registers have spilled. I noticed that there is spilled_regs array in
> reload1.c - but I can't seem to find where it dumps that information.
> Potentially I could build compiler with debug information; however, if an
> option exists, that would be great.
> If anyone knows of such an option, please share.
>
   There is no such option and there would be no sense for such option.  
GCC RA does a lot of things including pseudo-register live range 
splitting and rematerialization.  The RA might create a lot of new 
pseudos during its work.

   You can find some allocation metrics in .ira dump file (as the 
overall allocation cost, cost of using pseudos which were allocated to 
hard registers and memory, costs of loads, stores and moves generated 
during global RA).  The calculation is based on CFG BB and edge 
frequency estimation.  The calculation will be more accurate when you 
use profiling.

   But the allocation can be changed after IRA (global RA) in LRA (local 
RA) which might also create additional insns and pseudos. Btw reload 
pass is not used for major targets anymore.  It is an old pass which is 
being substituted by LRA.



More information about the Gcc mailing list