This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
when does Optimization happen....
- From: "sean yang" <seanatpurdue at hotmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Sun, 05 Mar 2006 23:25:11 +0000
- Subject: when does Optimization happen....
- Bcc:
I understand that gcc -On happens before generating assembly code (.s), is
it correct?
#gcc -S main.c; gcc -o a.out main.s (here without optimization)
#gcc -O2 -S main.c; gcc -o a1.out main.s (here with optimization of O2)
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).
Can someone give an explanation how gcc hanle this internally? Many thanks
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/