[PATCH] Add -fno-short-circuit-optimize

Tristan Gingold gingold@adacore.com
Mon Aug 25 16:21:00 GMT 2008


On Aug 22, 2008, at 6:48 PM, Richard Guenther wrote:

> On Fri, Aug 22, 2008 at 6:04 PM, Tristan Gingold  
> <gingold@adacore.com> wrote:
>> Argh, I tried to find all of them.  I used grep and examples but I  
>> may have
>> missed some places.
>>
>> Do you have specific passes/places in mind.
>
> tree-ssa-phiopt.c, tree-ssa-ifcombine.c and the jump threading code  
> in general.

-fprofile-arcs will prevent these optimizations to do transform short- 
circuit
operations into their direct forms.

The question remains for the case when -fprofile-arcs is not used.

Should -fno-short-circuit-optimize remove all optimizations that  
could make
the transformation or simply the initial one that specifically deals  
with
short-circuit operator ?

I have taken the traditionnal gcc approach: one flag per functionality.
Most of the optimizations passes can be disabled with a flag.

I am not sure that tree-ssa-phiopt.c can make this transform.  But I  
have to submit
a patch to add a flag to disable this pass as this can be useful in  
some cases.

Thanks,
Tristan.



More information about the Gcc-patches mailing list