Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Compilers > Predict registe...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 7 Topic 2395 of 2421
Post > Topic >>

Predict register usage

by Tim Frink <plfriko@[EMAIL PROTECTED] > Apr 25, 2008 at 01:56 PM

Hi,

When the optimization inline extension is performed on a high-level
intermediate representation or on a low-level IR before register
allocation, the final result for the inlined code after the register
allocation is not known. Thus, it might happen that due to the
increased register pressure after inlining, spill code must be added
heavily leading to a worse performance than before the
optimization. Do you know of any approaches which try to predict the
resulting spill code added by a register allocation when inlining is
done for a particular function?

My idea was that lifetime analyses might be used for that purpose. One
could find out how many variables (in high-level) or register are life
across a call. This is an indication for spill code candidates. Based
on this one could develop some heuristics that omit inlining for
functions that are supposed to add too much spilling. What do you
think about this idea?

Are there in general any approaches that try to predict the register
usage/spill code generation in the generated assembly code exclusively
based on the consideration of the source code (or high-level code) and
the knowledge of the underlying hardware the compiler produces code
for? This is probably very hard since it requires a deep knowledge of
the register allocator.

Regards,
Tim




 7 Posts in Topic:
Predict register usage
Tim Frink <plfriko@[EM  2008-04-25 13:56:25 
Re: Predict register usage
Chris F Clark <cfc@[EM  2008-04-25 23:36:26 
Re: Predict register usage
andreybokhanko@[EMAIL PRO  2008-05-02 00:35:46 
Predict register usage
"Inderaj Bains"  2008-04-26 10:01:47 
Re: Predict register usage
Sid Touati <SidTouati@  2008-04-28 12:11:26 
Re: Predict register usage
andreybokhanko@[EMAIL PRO  2008-05-02 00:33:54 
Re: Predict register usage
=?ISO-8859-1?Q?Bj=F6rn_Fr  2008-05-09 15:33:49 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed May 14 3:30:42 CDT 2008.