Mail Archives: djgpp/1994/08/08/17:43:27
>> Another Q is when you specify -O4 what exactly does this do? I
>> know that it is Optimization level 4, but the docs don't describe O's that
>> high. Is it about the same as O2?
>
>-O4 enables some expensive optimizations. The gcc manual tells which
>are which, but "cc1 -version -O4" will tell you what options are enabled.
>
Let me clarify a little. -O turns on simple optimizations. -O2 turns on
everything but -funroll-loops and -finline-functions. (-fomit-frame-pointer
will get turned on for machines that don't have a problem debugging
without frame pointers).
-O3 as of 2.6.0 will turn on -finline-functions. Anything above that does
nothing more. The code for checking is real simple and is just == 2, >= 3
checks. -O4 won't do anything more than -O3 in reality then.
James
- Raw text -