This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add -fno-short-circuit-optimize
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.