This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Fortran] Yet more array dependence improvements
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Thu, 9 Mar 2006 20:34:05 -0800
- Subject: Re: [Fortran] Yet more array dependence improvements
- References: <Pine.LNX.4.44.0603091554190.13291-100000@www.eyesopen.com>
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