pms writes:
> My question is as follwos
>
> We've a problem here. we were trying to use cc1 with & without -O option to
> verify the optimizations happening in our sample code.
> the sample code is given below
> file name : 1.c
> #include
> int main()
> { int a=5;
> int b;
> b=a;
> printf(
ebp
> andl$-16, %esp
> subl$16, %esp
> movl$5, 4(%esp)
> movl$.LC0, (%esp)
> callprintf
The first four statements set up the stack. The last three do the
printf statement.
What is your real question?
Ian
--
View this message
pms writes:
> thanks, But b=a is a assignment statement. It is doing some memory operations
> isn't it. Assuming b=a is a dead statement, how r the following i386
> assembly statements generated
> pushl %ebp
> movl%esp, %ebp
> andl$-16, %esp
> subl$16, %esp
ain (main)
>>
>> main ()
>> {
>> int b;
>> int a;
>>
>> :
>> a_2 = b_1(D);
>> return;
>>
>> }
>> but in 1.c.027t.ccp1, the output doesnot contain the actual assignment
>> b=a.
>> ;; Function main (main)
&g
a_2 = b_1(D);
> return;
>
> }
> but in 1.c.027t.ccp1, the output doesnot contain the actual assignment b=a.
> ;; Function main (main)
>
> main ()
> {
> int b;
> int a;
>
> :
> return;
>
> }
>
> We want to know, without b=a, how is it generati
contain the actual assignment b=a.
;; Function main (main)
main ()
{
int b;
int a;
:
return;
}
We want to know, without b=a, how is it generating the final code for b=a
Kindly help
--
View this message in context:
http://www.nabble.com/regarding-optimization-options-in-phase-ordering-