Re: Is global optimization worth it?

lance.delahaye@xtra.co.nz (Lance)
24 Jan 2002 13:46:15 -0500

          From comp.compilers

Related articles
Is global optimization worth it? lance.delahaye@xtra.co.nz (2001-12-15)
Re: Is global optimization worth it? nmm1@cus.cam.ac.uk (2001-12-20)
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: lance.delahaye@xtra.co.nz (Lance)
Newsgroups: comp.compilers
Date: 24 Jan 2002 13:46:15 -0500
Organization: http://groups.google.com/
References: 01-12-069 01-12-116
Keywords: optimize
Posted-Date: 24 Jan 2002 13:46:15 EST

Lex Spoon <lex@cc.gatech.edu> wrote in message news:01-12-116...
> lance.delahaye@xtra.co.nz (Lance) writes:
> > I'm starting a compiler project. I am wondering if it is worth
> > ignoring global optimisations for a pascal-type scoped language. About
> > how much optimisation gain is there to be had there? If its more than
> > about a third, I probably shouldn't ignore it, but it would simplify
> > my life quite a bit if I could.
>
> I'll try to avoid all the complexity, and just suggest two things.
>
> First, look at the assembly code your compiler produces for typical
> programs without any optimization. Then you can get a good idea of
> what improvements are possible.
>
> Second, don't forget to consider your priorities! How important is
> speed for you, really? Don't just say "very" -- honestly decide how
> much it would be worth to double (triple... quadruple...) the speed
> of all programs your compiler outputs.


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.


What are T1-T2 optimisations? (or whatever that was)


Post a followup to this message

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