Side effect of -finline-functions

Tim Prince n8tm@aol.com
Thu May 3 14:17:00 GMT 2012


On 05/03/2012 08:58 AM, Alexander Monakov wrote:
>> The manual says "Not all optimizations are controlled directly by a
>> flag. Only optimizations that have a flag are listed in this section."
>>   So there may be additional optimisations at -O3 beyond those listed.
> Yes, a statement like "breaks with -O3, works with -O3 -fno-inline-functions"
> would be stronger.
>
> Besides, inlining itself may not be doing a transformation that breaks your
> code, but instead open an opportunity for one of later optimization passes.
> Does your code break with -O2 -finline-functions?  You may want to start with
> -O2 -finline-functions (or -O3) and add -fno- options until one of them fixes
> your code to possibly identify the breaking transformation more accurately.
>
> Alexander
Data over-run frequently has more serious effect under 
-finline-functions.  This isn't necessarily associated with any 
additional transformations, aside from the increased number of 
opportunities to expose the problem.

-- 
Tim Prince



More information about the Gcc-help mailing list