This is the mail archive of the 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]

Re: [patch, fortran, 4.9] Improve efficiency of array constructor operators

On 28.03.2013 17:11, Thomas Koenig wrote:
Am 26.03.2013 18:17, schrieb Thomas Koenig:
Hi Tobias,

I have not yet looked at the patch, but I wonder whether that causes
invalid code for
if (any([a,b,c] < f()))
by evaluating f() multiple times.

This is avoided by this part of the patch: [...] which results in code like this:

__var_1 = f ();
if ((a > __var_1 || b > __var_1) || c > __var_1)

Are there any other concerns, or can I commit this?

Indeed, the code looks fine. OK for the trunk - see nits below. Thanks for the patch!

On 24.03.2013 22:46, Thomas Koenig wrote:
  /* Recursive optimization of operators.  */
Another empty line missing.


PS: Regarding the string comparison patch: As Janne, think it should be fine with also supporting kind=4 (don't forget to multiply the length by the kind, e.g. ts.kind or more properly (but equivalently) gfc_character_kinds[<index>].bit_size/BITS_PER_BYTE).
As follow up, I think you could do what OndÅej suggested.

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