This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: when does Optimization happen....
- From: Ben Elliston <bje at au1 dot ibm dot com>
- To: sean yang <seanatpurdue at hotmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 6 Mar 2006 18:27:57 +1100
- Subject: Re: when does Optimization happen....
- References: <BAY105-F3326FF9DEF0942F1408DCDC0E80@phx.gbl>
> I understand that gcc -On happens before generating assembly code (.s), is
> it correct?
Yes.
> But some optimization, such as inlining, may require cross
> compilation-unit (i.e, cross file) information. It seems that these
> kind of optization is better to be handled at link time (thus, cross
> compilation units info is available).
Yes, you're right; and this is a current subject of discussion for the
way forward for GCC. If you check the gcc@ mailing list archives
since December or so, you can see the discussion about "LTO" (link
time optimisation).
Ben