Predict register usage

"Inderaj Bains" <>
Sat, 26 Apr 2008 10:01:47 -0700

          From comp.compilers

Related articles
Predict register usage (Tim Frink) (2008-04-25)
Re: Predict register usage (Chris F Clark) (2008-04-25)
Predict register usage (Inderaj Bains) (2008-04-26)
Re: Predict register usage (Sid Touati) (2008-04-28)
Re: Predict register usage (2008-05-02)
Re: Predict register usage (2008-05-02)
Re: Predict register usage (=?ISO-8859-1?Q?Bj=F6rn_Franke?=) (2008-05-09)
| List of all articles for this month |

From: "Inderaj Bains" <>
Newsgroups: comp.compilers
Date: Sat, 26 Apr 2008 10:01:47 -0700
Organization: Compilers Central
References: 08-04-093
Keywords: registers
Posted-Date: 26 Apr 2008 13:06:02 EDT

Function call has overheads including calling convention spill/reload
or maybe you do global register allocation. Finally the code is
executed at the same place, right? call or no call there is no magic,
you need the resources. Though inlining reduces call overhead,
subsequent code motion can increase register usage. Maybe by not
inlining you are limiting the ability of downstream optimizations to
mess up and inlining is not the issue. So what you can do here might
be driven less by the particular goodness of a particular approach and
more by what your downstream optimizations do, including how good
allocation is. For a cheap solution, you could try putting code motion
barriers around your inlined function when you see high register

For a general solution, to me it seems that my ability to consider all
inter-optimization tradeoffs, architectural tradeoffs, fiddle
endlessly with switches to produce good results is limited. Using
machine learning or autotuners and letting machine do a good part of
this work might be the long term solution in coming time.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.