This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]