[Fortran] Yet more array dependence improvements
Steve Kargl
sgk@troutmask.apl.washington.edu
Fri Mar 10 04:34:00 GMT 2006
On Thu, Mar 09, 2006 at 04:18:57PM -0700, Roger Sayle wrote:
>
> Ok for mainline?
I have a few questions, and will read through this on Saturday.
> + if (gfc_dep_compare_expr (e1->value.op.op1, e2->value.op.op1) == 0
> + && gfc_dep_compare_expr (e1->value.op.op2, e2->value.op.op2) == 0)
> + return 0;
This deals with "n + 1" == "n + 1"
> + /* TODO Handle commutative binary operators here? */
> + return -2;
Is this comment for "n + 1" == "1 + n"? Won't the following work?
if (gfc_dep_compare_expr (e1->value.op.op1, e2->value.op.op2) == 0
&& gfc_dep_compare_expr (e1->value.op.op2, e2->value.op.op1) == 0)
return 0;
> + /* We should list the "constant" intrinsic functions. Those
> + without side-effects that provide equal results given equal
> + argument lists. */
I don't understand this comment. Intrinsic functions in Fortran 95
are pure, so by definition none of the intrinsic functions have
side-effects. Is this comment meant for the intrinsics that gfortran
inlines/turns-into __convert_* fucntions?
--
Steve
More information about the Gcc-patches
mailing list