> Which ones are the -O ones?
Erm, the ones I invoke with -O :)
I thought they were seperate from the semantic pass van Bommel mentioned

> You can see which optimizations are applied in the front end in optimize.c
Thanks!

>
> For example this:
>
> ---
> int foo(int x) {
>   return x * 2 * 2;
> }
>
> int bar(int x) {
>   return 2 * 2 * x;
> }
> ---
>
> is transformed to this:
>
> ---
> int foo(int x) {
>   return x * 2 * 2;
> }
>
> int bar(int x) {
>   return 4 * x;
> }
> ---
>
> So it seems the optimize.c code just optimizes left subexpressions. I 
> wonder if -O does more that. Because if not, there's still a lof of room 
> for optimization in the compiler.
wow...

>
> Where can I find a version of obj2asm for Windows to see what's going on 
> in those cases?
I think it is in here:
http://www.digitalmars.com/eup.html
When is your birthday? :D



Reply via email to