This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: IPO optimization framework for GCC
- From: Diego Novillo <dnovillo at redhat dot com>
- To: gcc at gcc dot gnu dot org
- Cc: Steve Ellcey <sje at cup dot hp dot com>
- Date: Wed, 12 Oct 2005 10:20:23 -0400
- Subject: Re: RFC: IPO optimization framework for GCC
- References: <200510102325.QAA22039@hpsje.cup.hp.com>
On Monday 10 October 2005 19:25, Steve Ellcey wrote:
> Could we just have -fwrite-ipo create a '.o' file that contains the
> intermediate representation (instead of being a real object file).
>
> Then when the linker is called it would call the compiler with all the
> files that have intermediate code instead of object code and finish up
> the compilation. Actually, maybe we could add the restriction that
> you have to use GCC to call the linker when doing IPO and that way
> GCC could finish up the compilations before it calls the linker.
>
That's the model I'm used to, so I would prefer this approach.
> > Second question is - When to put info on the disk? Few alternatives,
> > 1) Before gimplfication
> > 2) Before optimizing tree-ssa
> > 3) After tree-ssa optimization is complete
>
Here. You want to pick up at a point where you can still do high level
optimizations. HLO can be more powerful when done with the whole program
at hand. If you stream the IL when you are in RTL, it's too late for
that.
> I would think one would want to put the info out before optimizing
> tree-ssa since you would hope that the IPO data from other modules would
> let you do better tree-ssa optimizations.
>
Yes, but if you can optimize locally first, you'd be able to write out a
cleaner IL.