This is the mail archive of the
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....
I understand that gcc -On happens before generating assembly code (.s), is
#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
Can someone give an explanation how gcc hanle this internally? Many thanks
Express yourself instantly with MSN Messenger! Download today - it's FREE!