[gfortran,patch] Use short-circuiting IF and AND expressions in gfortran

FX Coudert fxcoudert@gmail.com
Mon Mar 5 06:49:00 GMT 2007

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?

:ADDPATCH fortran:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: short-circuit.diff
Type: application/octet-stream
Size: 3899 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070305/a11dfb97/attachment.obj>

More information about the Gcc-patches mailing list