Related articles |
---|
[4 earlier articles] |
Re: Is global optimization worth it? lex@cc.gatech.edu (Lex Spoon) (2001-12-20) |
Re: Is global optimization worth it? lance.delahaye@xtra.co.nz (2002-01-24) |
Re: Is global optimization worth it? lance.delahaye@xtra.co.nz (2002-01-24) |
Re: Is global optimization worth it? nmm1@cus.cam.ac.uk (2002-01-24) |
Re: Is global optimization worth it? rinie@xs4all.nl (Rinie Kervel) (2002-01-28) |
Re: Is global optimization worth it? nmm1@cus.cam.ac.uk (2002-01-30) |
Re: Is global optimization worth it? rinie@xs4all.nl (Rinie Kervel) (2002-02-06) |
From: | Rinie Kervel <rinie@xs4all.nl> |
Newsgroups: | comp.compilers |
Date: | 6 Feb 2002 23:31:34 -0500 |
Organization: | XS4ALL Internet BV |
References: | 01-12-069 01-12-116 02-01-097 02-01-146 02-01-170 |
Keywords: | C, optimize |
Posted-Date: | 06 Feb 2002 23:31:34 EST |
Nick Maclaren wrote:
> safely. In C, you cannot, because of the aliasing problems - hence
> the need for global optimisation to detect such aliasing.
>
> Even larger gains on modern systems come from things like operand
> preloading, but let's consider just register use. It isn't unusual
> for a C code not to be able to make use of more than a few registers
> because everything has to be in memory over every function call.
> Global optimisation can remove most of that constraint, and allow the
> use of (say) 20 registers where only 4 could be used before.
Again, I think this is mostly theoretical. If you use local variables and
parameters instead of ugly globals this is not much of a problem. Register
allocation etc provide much gain in loops that are in most real programs
quite simple and don't use 16 globals, or 20 registers at all.
Regards,
Rinie Kervel
Return to the
comp.compilers page.
Search the
comp.compilers archives again.