Re: when does Optimization happen....

2006-03-05 Thread Ben Elliston
> 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, cro

when does Optimization happen....

2006-03-05 Thread sean yang
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-un