This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gfortran,patch] Use short-circuiting IF and AND expressions in gfortran
- From: FX Coudert <fxcoudert at gmail dot com>
- To: gfortran List <fortran at gcc dot gnu dot org>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 5 Mar 2007 07:49:45 +0100
- Subject: [gfortran,patch] Use short-circuiting IF and AND expressions in gfortran
Hi all,
Attached patch changes some uses of TRUTH_(AND|OR)_EXPR to their
short-circuiting equivalents, TRUTH_(AND|OR)IF_EXPR. Most of these
conditions were written by yours truly, and are used in the
evaluation of array section extents (to detect zero-sized array
sections, mainly).
I'm not sure whether this can really help the middle-end and
optimizers, and couldn't measure any performance gain on some
generated executables, but I think it's worth doing nonetheless.
Bootstrapped and regtested on i686-linux, OK for mainline?
FX
:ADDPATCH fortran:
Attachment:
short-circuit.diff
Description: Binary data