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]

Re: [Fortran] Yet more array dependence improvements


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


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