Re: Is global optimization worth it?

Rinie Kervel <rinie@xs4all.nl>
28 Jan 2002 01:08:04 -0500

          From comp.compilers

Related articles
[2 earlier articles]
Re: Is global optimization worth it? rsherry8@home.com (Robert Sherry) (2001-12-20)
Re: Is global optimization worth it? mwso@earthlink.net (Gary Oblock) (2001-12-20)
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)
| List of all articles for this month |

From: Rinie Kervel <rinie@xs4all.nl>
Newsgroups: comp.compilers
Date: 28 Jan 2002 01:08:04 -0500
Organization: XS4ALL Internet BV
References: 01-12-069 01-12-116 02-01-097
Keywords: optimize
Posted-Date: 28 Jan 2002 01:07:43 EST

Lance wrote:


> Actually, thats why I'm here. I have a compiler working, and the
>code it generates makes me cringe. But it works. So I did some
>research, and it turns out my compiler is a "naive" compiler. I need
>to recode the code generator so that it generates machine code the
>way I do: select instructions leading towards what I want, allocate
>registers (OK - I know, thats obvious - in hindsight) For now my goal
>is "simple" - the compiler should generate code that doesn't make me
>cringe. I am an experienced C/assembly (embedded systems) coder, so
>that will take some doing :( At this point, I've done enough research
>to know what I'm letting myself in for.


I see the other posters jumping directly to alias analysis, which
poses some theoretical restrictions on C optimisations. I donīt know
if this is actually a severe restriction in real life programs: many C
programs don't use floating point at all. So I think you can start
with some real gains as using as many registers as you can, avoiding
frame pointers, passing parameters in registers, strcpy inlining etc,
accessing globals by offset of a previous global etc.


I donīt think many assembly programmers do much alias analyses
either...


Rinie


Post a followup to this message

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