OSDN Git Service

PR c++/47132
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa-ccp.c
index 5551df2..2caec4c 100644 (file)
@@ -1,6 +1,6 @@
 /* Conditional constant propagation pass for the GNU compiler.
    Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-   2010 Free Software Foundation, Inc.
+   2010, 2011 Free Software Foundation, Inc.
    Adapted from original RTL SSA-CCP by Daniel Berlin <dberlin@dberlin.org>
    Adapted to GIMPLE trees by Diego Novillo <dnovillo@redhat.com>
 
@@ -131,8 +131,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"
 #include "target.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "dbgcnt.h"
+#include "gimple-fold.h"
 
 
 /* Possible lattice values.  */
@@ -315,7 +315,14 @@ get_value (tree var)
 static inline tree
 get_constant_value (tree var)
 {
-  prop_value_t *val = get_value (var);
+  prop_value_t *val;
+  if (TREE_CODE (var) != SSA_NAME)
+    {
+      if (is_gimple_min_invariant (var))
+        return var;
+      return NULL_TREE;
+    }
+  val = get_value (var);
   if (val
       && val->lattice_val == CONSTANT
       && (TREE_CODE (val->value) != INTEGER_CST
@@ -509,12 +516,14 @@ get_value_from_alignment (tree expr)
   base = get_inner_reference (TREE_OPERAND (expr, 0),
                              &bitsize, &bitpos, &offset,
                              &mode, &align, &align, false);
-  if (TREE_CODE (base) == MISALIGNED_INDIRECT_REF)
-    val = get_value_for_expr (TREE_OPERAND (base, 0), true);
-  else if (TREE_CODE (base) == MEM_REF)
+  if (TREE_CODE (base) == MEM_REF)
     val = bit_value_binop (PLUS_EXPR, TREE_TYPE (expr),
                           TREE_OPERAND (base, 0), TREE_OPERAND (base, 1));
   else if (base
+          /* ???  While function decls have DECL_ALIGN their addresses
+             may encode extra information in the lower bits on some
+             targets (PR47239).  Simply punt for function decls for now.  */
+          && TREE_CODE (base) != FUNCTION_DECL
           && ((align = get_object_alignment (base, BIGGEST_ALIGNMENT))
                > BITS_PER_UNIT))
     {
@@ -1087,209 +1096,6 @@ ccp_fold (gimple stmt)
   location_t loc = gimple_location (stmt);
   switch (gimple_code (stmt))
     {
-    case GIMPLE_ASSIGN:
-      {
-        enum tree_code subcode = gimple_assign_rhs_code (stmt);
-
-        switch (get_gimple_rhs_class (subcode))
-          {
-          case GIMPLE_SINGLE_RHS:
-            {
-              tree rhs = gimple_assign_rhs1 (stmt);
-              enum tree_code_class kind = TREE_CODE_CLASS (subcode);
-
-              if (TREE_CODE (rhs) == SSA_NAME)
-                {
-                  /* If the RHS is an SSA_NAME, return its known constant value,
-                     if any.  */
-                  return get_constant_value (rhs);
-                }
-             /* Handle propagating invariant addresses into address operations.
-                The folding we do here matches that in tree-ssa-forwprop.c.  */
-             else if (TREE_CODE (rhs) == ADDR_EXPR)
-               {
-                 tree *base;
-                 base = &TREE_OPERAND (rhs, 0);
-                 while (handled_component_p (*base))
-                   base = &TREE_OPERAND (*base, 0);
-                 if (TREE_CODE (*base) == MEM_REF
-                     && TREE_CODE (TREE_OPERAND (*base, 0)) == SSA_NAME)
-                   {
-                     tree val = get_constant_value (TREE_OPERAND (*base, 0));
-                     if (val
-                         && TREE_CODE (val) == ADDR_EXPR)
-                       {
-                         tree ret, save = *base;
-                         tree new_base;
-                         new_base = fold_build2 (MEM_REF, TREE_TYPE (*base),
-                                                 unshare_expr (val),
-                                                 TREE_OPERAND (*base, 1));
-                         /* We need to return a new tree, not modify the IL
-                            or share parts of it.  So play some tricks to
-                            avoid manually building it.  */
-                         *base = new_base;
-                         ret = unshare_expr (rhs);
-                         recompute_tree_invariant_for_addr_expr (ret);
-                         *base = save;
-                         return ret;
-                       }
-                   }
-               }
-             else if (TREE_CODE (rhs) == CONSTRUCTOR
-                      && TREE_CODE (TREE_TYPE (rhs)) == VECTOR_TYPE
-                      && (CONSTRUCTOR_NELTS (rhs)
-                          == TYPE_VECTOR_SUBPARTS (TREE_TYPE (rhs))))
-               {
-                 unsigned i;
-                 tree val, list;
-
-                 list = NULL_TREE;
-                 FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (rhs), i, val)
-                   {
-                     val = valueize_op (val);
-                     if (TREE_CODE (val) == INTEGER_CST
-                         || TREE_CODE (val) == REAL_CST
-                         || TREE_CODE (val) == FIXED_CST)
-                       list = tree_cons (NULL_TREE, val, list);
-                     else
-                       return NULL_TREE;
-                   }
-
-                 return build_vector (TREE_TYPE (rhs), nreverse (list));
-               }
-
-              if (kind == tcc_reference)
-               {
-                 if ((TREE_CODE (rhs) == VIEW_CONVERT_EXPR
-                      || TREE_CODE (rhs) == REALPART_EXPR
-                      || TREE_CODE (rhs) == IMAGPART_EXPR)
-                     && TREE_CODE (TREE_OPERAND (rhs, 0)) == SSA_NAME)
-                   {
-                     tree val = get_constant_value (TREE_OPERAND (rhs, 0));
-                     if (val)
-                       return fold_unary_loc (EXPR_LOCATION (rhs),
-                                              TREE_CODE (rhs),
-                                              TREE_TYPE (rhs), val);
-                   }
-                 else if (TREE_CODE (rhs) == MEM_REF
-                          && TREE_CODE (TREE_OPERAND (rhs, 0)) == SSA_NAME)
-                   {
-                     tree val = get_constant_value (TREE_OPERAND (rhs, 0));
-                     if (val
-                         && TREE_CODE (val) == ADDR_EXPR)
-                       {
-                         tree tem = fold_build2 (MEM_REF, TREE_TYPE (rhs),
-                                                 unshare_expr (val),
-                                                 TREE_OPERAND (rhs, 1));
-                         if (tem)
-                           rhs = tem;
-                       }
-                   }
-                 return fold_const_aggregate_ref (rhs);
-               }
-              else if (kind == tcc_declaration)
-                return get_symbol_constant_value (rhs);
-              return rhs;
-            }
-
-          case GIMPLE_UNARY_RHS:
-            {
-              /* Handle unary operators that can appear in GIMPLE form.
-                 Note that we know the single operand must be a constant,
-                 so this should almost always return a simplified RHS.  */
-              tree lhs = gimple_assign_lhs (stmt);
-              tree op0 = valueize_op (gimple_assign_rhs1 (stmt));
-
-             /* Conversions are useless for CCP purposes if they are
-                value-preserving.  Thus the restrictions that
-                useless_type_conversion_p places for pointer type conversions
-                do not apply here.  Substitution later will only substitute to
-                allowed places.  */
-             if (CONVERT_EXPR_CODE_P (subcode)
-                 && POINTER_TYPE_P (TREE_TYPE (lhs))
-                 && POINTER_TYPE_P (TREE_TYPE (op0)))
-               {
-                 tree tem;
-                 /* Try to re-construct array references on-the-fly.  */
-                 if (!useless_type_conversion_p (TREE_TYPE (lhs),
-                                                 TREE_TYPE (op0))
-                     && ((tem = maybe_fold_offset_to_address
-                          (loc,
-                           op0, integer_zero_node, TREE_TYPE (lhs)))
-                         != NULL_TREE))
-                   return tem;
-                 return op0;
-               }
-
-              return
-               fold_unary_ignore_overflow_loc (loc, subcode,
-                                               gimple_expr_type (stmt), op0);
-            }
-
-          case GIMPLE_BINARY_RHS:
-            {
-              /* Handle binary operators that can appear in GIMPLE form.  */
-              tree op0 = valueize_op (gimple_assign_rhs1 (stmt));
-              tree op1 = valueize_op (gimple_assign_rhs2 (stmt));
-
-             /* Translate &x + CST into an invariant form suitable for
-                further propagation.  */
-             if (gimple_assign_rhs_code (stmt) == POINTER_PLUS_EXPR
-                 && TREE_CODE (op0) == ADDR_EXPR
-                 && TREE_CODE (op1) == INTEGER_CST)
-               {
-                 tree off = fold_convert (ptr_type_node, op1);
-                 return build_fold_addr_expr
-                          (fold_build2 (MEM_REF,
-                                        TREE_TYPE (TREE_TYPE (op0)),
-                                        unshare_expr (op0), off));
-               }
-
-              return fold_binary_loc (loc, subcode,
-                                     gimple_expr_type (stmt), op0, op1);
-            }
-
-          case GIMPLE_TERNARY_RHS:
-            {
-              /* Handle ternary operators that can appear in GIMPLE form.  */
-              tree op0 = valueize_op (gimple_assign_rhs1 (stmt));
-              tree op1 = valueize_op (gimple_assign_rhs2 (stmt));
-              tree op2 = valueize_op (gimple_assign_rhs3 (stmt));
-
-              return fold_ternary_loc (loc, subcode,
-                                      gimple_expr_type (stmt), op0, op1, op2);
-            }
-
-          default:
-            gcc_unreachable ();
-          }
-      }
-      break;
-
-    case GIMPLE_CALL:
-      {
-       tree fn = valueize_op (gimple_call_fn (stmt));
-       if (TREE_CODE (fn) == ADDR_EXPR
-           && TREE_CODE (TREE_OPERAND (fn, 0)) == FUNCTION_DECL
-           && DECL_BUILT_IN (TREE_OPERAND (fn, 0)))
-         {
-           tree *args = XALLOCAVEC (tree, gimple_call_num_args (stmt));
-           tree call, retval;
-           unsigned i;
-           for (i = 0; i < gimple_call_num_args (stmt); ++i)
-             args[i] = valueize_op (gimple_call_arg (stmt, i));
-           call = build_call_array_loc (loc,
-                                        gimple_call_return_type (stmt),
-                                        fn, gimple_call_num_args (stmt), args);
-           retval = fold_call_expr (EXPR_LOCATION (call), call, false);
-           if (retval)
-             /* fold_call_expr wraps the result inside a NOP_EXPR.  */
-             STRIP_NOPS (retval);
-           return retval;
-         }
-       return NULL_TREE;
-      }
-
     case GIMPLE_COND:
       {
         /* Handle comparison operators that can appear in GIMPLE form.  */
@@ -1305,287 +1111,13 @@ ccp_fold (gimple stmt)
         return valueize_op (gimple_switch_index (stmt));
       }
 
-    default:
-      gcc_unreachable ();
-    }
-}
-
-/* Return the tree representing the element referenced by T if T is an
-   ARRAY_REF or COMPONENT_REF into constant aggregates.  Return
-   NULL_TREE otherwise.  */
-
-tree
-fold_const_aggregate_ref (tree t)
-{
-  tree base, ctor, idx, field;
-  unsigned HOST_WIDE_INT cnt;
-  tree cfield, cval;
-  tree tem;
-
-  if (TREE_CODE_CLASS (TREE_CODE (t)) == tcc_declaration)
-    return get_symbol_constant_value (t);
-
-  switch (TREE_CODE (t))
-    {
-    case ARRAY_REF:
-      /* Get a CONSTRUCTOR.  If BASE is a VAR_DECL, get its
-        DECL_INITIAL.  If BASE is a nested reference into another
-        ARRAY_REF or COMPONENT_REF, make a recursive call to resolve
-        the inner reference.  */
-      base = TREE_OPERAND (t, 0);
-      switch (TREE_CODE (base))
-       {
-       case MEM_REF:
-         /* ???  We could handle this case.  */
-         if (!integer_zerop (TREE_OPERAND (base, 1)))
-           return NULL_TREE;
-         base = get_base_address (base);
-         if (!base
-             || TREE_CODE (base) != VAR_DECL)
-           return NULL_TREE;
-
-         /* Fallthru.  */
-       case VAR_DECL:
-         if (!TREE_READONLY (base)
-             || TREE_CODE (TREE_TYPE (base)) != ARRAY_TYPE
-             || !targetm.binds_local_p (base))
-           return NULL_TREE;
-
-         ctor = DECL_INITIAL (base);
-         break;
-
-       case ARRAY_REF:
-       case COMPONENT_REF:
-         ctor = fold_const_aggregate_ref (base);
-         break;
-
-       case STRING_CST:
-       case CONSTRUCTOR:
-         ctor = base;
-         break;
-
-       default:
-         return NULL_TREE;
-       }
-
-      if (ctor == NULL_TREE
-         || (TREE_CODE (ctor) != CONSTRUCTOR
-             && TREE_CODE (ctor) != STRING_CST)
-         || !TREE_STATIC (ctor))
-       return NULL_TREE;
-
-      /* Get the index.  If we have an SSA_NAME, try to resolve it
-        with the current lattice value for the SSA_NAME.  */
-      idx = TREE_OPERAND (t, 1);
-      switch (TREE_CODE (idx))
-       {
-       case SSA_NAME:
-         if ((tem = get_constant_value (idx))
-             && TREE_CODE (tem) == INTEGER_CST)
-           idx = tem;
-         else
-           return NULL_TREE;
-         break;
-
-       case INTEGER_CST:
-         break;
-
-       default:
-         return NULL_TREE;
-       }
-
-      /* Fold read from constant string.  */
-      if (TREE_CODE (ctor) == STRING_CST)
-       {
-         if ((TYPE_MODE (TREE_TYPE (t))
-              == TYPE_MODE (TREE_TYPE (TREE_TYPE (ctor))))
-             && (GET_MODE_CLASS (TYPE_MODE (TREE_TYPE (TREE_TYPE (ctor))))
-                 == MODE_INT)
-             && GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (TREE_TYPE (ctor)))) == 1
-             && compare_tree_int (idx, TREE_STRING_LENGTH (ctor)) < 0)
-           return build_int_cst_type (TREE_TYPE (t),
-                                      (TREE_STRING_POINTER (ctor)
-                                       [TREE_INT_CST_LOW (idx)]));
-         return NULL_TREE;
-       }
-
-      /* Whoo-hoo!  I'll fold ya baby.  Yeah!  */
-      FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (ctor), cnt, cfield, cval)
-       if (tree_int_cst_equal (cfield, idx))
-         {
-           STRIP_NOPS (cval);
-           if (TREE_CODE (cval) == ADDR_EXPR)
-             {
-               tree base = get_base_address (TREE_OPERAND (cval, 0));
-               if (base && TREE_CODE (base) == VAR_DECL)
-                 add_referenced_var (base);
-             }
-           return cval;
-         }
-      break;
-
-    case COMPONENT_REF:
-      /* Get a CONSTRUCTOR.  If BASE is a VAR_DECL, get its
-        DECL_INITIAL.  If BASE is a nested reference into another
-        ARRAY_REF or COMPONENT_REF, make a recursive call to resolve
-        the inner reference.  */
-      base = TREE_OPERAND (t, 0);
-      switch (TREE_CODE (base))
-       {
-       case VAR_DECL:
-         if (!TREE_READONLY (base)
-             || TREE_CODE (TREE_TYPE (base)) != RECORD_TYPE
-             || !targetm.binds_local_p (base))
-           return NULL_TREE;
-
-         ctor = DECL_INITIAL (base);
-         break;
-
-       case ARRAY_REF:
-       case COMPONENT_REF:
-         ctor = fold_const_aggregate_ref (base);
-         break;
-
-       default:
-         return NULL_TREE;
-       }
-
-      if (ctor == NULL_TREE
-         || TREE_CODE (ctor) != CONSTRUCTOR
-         || !TREE_STATIC (ctor))
-       return NULL_TREE;
-
-      field = TREE_OPERAND (t, 1);
-
-      FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (ctor), cnt, cfield, cval)
-       if (cfield == field
-           /* FIXME: Handle bit-fields.  */
-           && ! DECL_BIT_FIELD (cfield))
-         {
-           STRIP_NOPS (cval);
-           if (TREE_CODE (cval) == ADDR_EXPR)
-             {
-               tree base = get_base_address (TREE_OPERAND (cval, 0));
-               if (base && TREE_CODE (base) == VAR_DECL)
-                 add_referenced_var (base);
-             }
-           return cval;
-         }
-      break;
-
-    case REALPART_EXPR:
-    case IMAGPART_EXPR:
-      {
-       tree c = fold_const_aggregate_ref (TREE_OPERAND (t, 0));
-       if (c && TREE_CODE (c) == COMPLEX_CST)
-         return fold_build1_loc (EXPR_LOCATION (t),
-                             TREE_CODE (t), TREE_TYPE (t), c);
-       break;
-      }
-
-    case MEM_REF:
-      /* Get the base object we are accessing.  */
-      base = TREE_OPERAND (t, 0);
-      if (TREE_CODE (base) == SSA_NAME
-         && (tem = get_constant_value (base)))
-       base = tem;
-      if (TREE_CODE (base) != ADDR_EXPR)
-       return NULL_TREE;
-      base = TREE_OPERAND (base, 0);
-      switch (TREE_CODE (base))
-       {
-       case VAR_DECL:
-         if (DECL_P (base)
-             && !AGGREGATE_TYPE_P (TREE_TYPE (base))
-             && integer_zerop (TREE_OPERAND (t, 1)))
-           {
-             tree res = get_symbol_constant_value (base);
-             if (res
-                 && !useless_type_conversion_p
-                       (TREE_TYPE (t), TREE_TYPE (res)))
-               res = fold_unary (VIEW_CONVERT_EXPR, TREE_TYPE (t), res);
-             return res;
-           }
-
-         if (!TREE_READONLY (base)
-             || TREE_CODE (TREE_TYPE (base)) != ARRAY_TYPE
-             || !targetm.binds_local_p (base))
-           return NULL_TREE;
-
-         ctor = DECL_INITIAL (base);
-         break;
-
-       case STRING_CST:
-       case CONSTRUCTOR:
-         ctor = base;
-         break;
-
-       default:
-         return NULL_TREE;
-       }
-
-      if (ctor == NULL_TREE
-         || (TREE_CODE (ctor) != CONSTRUCTOR
-             && TREE_CODE (ctor) != STRING_CST)
-         || !TREE_STATIC (ctor))
-       return NULL_TREE;
-
-      /* Get the byte offset.  */
-      idx = TREE_OPERAND (t, 1);
-
-      /* Fold read from constant string.  */
-      if (TREE_CODE (ctor) == STRING_CST)
-       {
-         if ((TYPE_MODE (TREE_TYPE (t))
-              == TYPE_MODE (TREE_TYPE (TREE_TYPE (ctor))))
-             && (GET_MODE_CLASS (TYPE_MODE (TREE_TYPE (TREE_TYPE (ctor))))
-                 == MODE_INT)
-             && GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (TREE_TYPE (ctor)))) == 1
-             && compare_tree_int (idx, TREE_STRING_LENGTH (ctor)) < 0)
-           return build_int_cst_type (TREE_TYPE (t),
-                                      (TREE_STRING_POINTER (ctor)
-                                       [TREE_INT_CST_LOW (idx)]));
-         return NULL_TREE;
-       }
-
-      /* ???  Implement byte-offset indexing into a non-array CONSTRUCTOR.  */
-      if (TREE_CODE (TREE_TYPE (ctor)) == ARRAY_TYPE
-         && (TYPE_MODE (TREE_TYPE (t))
-             == TYPE_MODE (TREE_TYPE (TREE_TYPE (ctor))))
-         && GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (t))) != 0
-         && integer_zerop
-              (int_const_binop
-                 (TRUNC_MOD_EXPR, idx,
-                  size_int (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (t)))), 0)))
-       {
-         idx = int_const_binop (TRUNC_DIV_EXPR, idx,
-                                size_int (GET_MODE_SIZE
-                                            (TYPE_MODE (TREE_TYPE (t)))), 0);
-         FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (ctor), cnt, cfield, cval)
-           if (tree_int_cst_equal (cfield, idx))
-             {
-               STRIP_NOPS (cval);
-               if (TREE_CODE (cval) == ADDR_EXPR)
-                 {
-                   tree base = get_base_address (TREE_OPERAND (cval, 0));
-                   if (base && TREE_CODE (base) == VAR_DECL)
-                     add_referenced_var (base);
-                 }
-               if (useless_type_conversion_p (TREE_TYPE (t), TREE_TYPE (cval)))
-                 return cval;
-               else if (CONSTANT_CLASS_P (cval))
-                 return fold_build1 (VIEW_CONVERT_EXPR, TREE_TYPE (t), cval);
-               else
-                 return NULL_TREE;
-             }
-       }
-      break;
+    case GIMPLE_ASSIGN:
+    case GIMPLE_CALL:
+      return gimple_fold_stmt_to_constant_1 (stmt, valueize_op);
 
     default:
-      break;
+      gcc_unreachable ();
     }
-
-  return NULL_TREE;
 }
 
 /* Apply the operation CODE in type TYPE to the value, mask pair
@@ -1717,6 +1249,13 @@ bit_value_binop_1 (enum tree_code code, tree type,
            }
          else if (shift < 0)
            {
+             /* ???  We can have sizetype related inconsistencies in
+                the IL.  */
+             if ((TREE_CODE (r1type) == INTEGER_TYPE
+                  && (TYPE_IS_SIZETYPE (r1type)
+                      ? 0 : TYPE_UNSIGNED (r1type))) != uns)
+               break;
+
              shift = -shift;
              *mask = double_int_rshift (r1mask, shift,
                                         TYPE_PRECISION (type), !uns);
@@ -1827,6 +1366,14 @@ bit_value_binop_1 (enum tree_code code, tree type,
        if (double_int_negative_p (r1mask) || double_int_negative_p (r2mask))
          break;
 
+       /* For comparisons the signedness is in the comparison operands.  */
+       uns = (TREE_CODE (r1type) == INTEGER_TYPE
+              && TYPE_IS_SIZETYPE (r1type) ? 0 : TYPE_UNSIGNED (r1type));
+       /* ???  We can have sizetype related inconsistencies in the IL.  */
+       if ((TREE_CODE (r2type) == INTEGER_TYPE
+            && TYPE_IS_SIZETYPE (r2type) ? 0 : TYPE_UNSIGNED (r2type)) != uns)
+         break;
+
        /* If we know the most significant bits we know the values
           value ranges by means of treating varying bits as zero
           or one.  Do a cross comparison of the max/min pairs.  */
@@ -2041,9 +1588,10 @@ evaluate_stmt (gimple stmt)
              if (INTEGRAL_TYPE_P (TREE_TYPE (rhs1))
                  || POINTER_TYPE_P (TREE_TYPE (rhs1)))
                {
+                 tree lhs = gimple_assign_lhs (stmt);
                  tree rhs2 = gimple_assign_rhs2 (stmt);
                  val = bit_value_binop (subcode,
-                                        TREE_TYPE (rhs1), rhs1, rhs2);
+                                        TREE_TYPE (lhs), rhs1, rhs2);
                }
              break;
 
@@ -2174,11 +1722,16 @@ ccp_fold_stmt (gimple_stmt_iterator *gsi)
            return true;
          }
 
+       /* Internal calls provide no argument types, so the extra laxity
+          for normal calls does not apply.  */
+       if (gimple_call_internal_p (stmt))
+         return false;
+
        /* Propagate into the call arguments.  Compared to replace_uses_in
           this can use the argument slot types for type verification
           instead of the current argument type.  We also can safely
           drop qualifiers here as we are dealing with constants anyway.  */
-       argt = TYPE_ARG_TYPES (TREE_TYPE (TREE_TYPE (gimple_call_fn (stmt))));
+       argt = TYPE_ARG_TYPES (gimple_call_fntype (stmt));
        for (i = 0; i < gimple_call_num_args (stmt) && argt;
             ++i, argt = TREE_CHAIN (argt))
          {