This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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] |
The attached patch is a simple one-liner that avoids multiple evaluation of array index when performing bounds checking in some conditions (PR 32036). It does so by creating a SAVE_EXPR (an expr whose content is only evaluated once) [1]. Simple, and easy to review! (I also committed it as obvious, but since I've not been working too much on gfortran lately, I decided it's best to ask for review.)
I think you should use the function save_expr instead of manually building the SAVE_EXPR.
Thanks, Andrew Pinski
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |