This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto] PATCH: CALL_EXPR changes to gcc/tree-ssa-loop-niter.c
- From: Sandra Loosemore <sandra at codesourcery dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 12 Jul 2006 15:09:24 -0400
- Subject: [lto] PATCH: CALL_EXPR changes to gcc/tree-ssa-loop-niter.c
Already committed as "obvious".
-Sandra
2006-07-12 Sandra Loosemore <sandra@codesourcery.com>
* gcc/tree-ssa-loop-niter.c (infer_loop_bounds_from_undefined): Use
FOR_EACH_CALL_EXPR_ARG to iterate over arguments.
Index: gcc/tree-ssa-loop-niter.c
===================================================================
*** gcc/tree-ssa-loop-niter.c (revision 115346)
--- gcc/tree-ssa-loop-niter.c (working copy)
*************** infer_loop_bounds_from_undefined (struct
*** 1628,1640 ****
case CALL_EXPR:
{
! tree args;
!
! for (args = TREE_OPERAND (stmt, 1); args;
! args = TREE_CHAIN (args))
! if (TREE_CODE (TREE_VALUE (args)) == ARRAY_REF
! && !array_ref_contains_indirect_ref (TREE_VALUE (args)))
! estimate_iters_using_array (stmt, TREE_VALUE (args));
break;
}
--- 1628,1639 ----
case CALL_EXPR:
{
! tree arg;
! call_expr_arg_iterator iter;
! FOR_EACH_CALL_EXPR_ARG (arg, iter, stmt)
! if (TREE_CODE (arg) == ARRAY_REF
! && !array_ref_contains_indirect_ref (arg))
! estimate_iters_using_array (stmt, arg);
break;
}