OSDN Git Service

2009-04-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / lambda-code.c
index 794d4e8..852be11 100644 (file)
@@ -2142,7 +2142,7 @@ can_put_in_inner_loop (struct loop *inner, gimple stmt)
   use_operand_p use_p;
   
   gcc_assert (is_gimple_assign (stmt));
-  if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS)
+  if (gimple_vuse (stmt)
       || !stmt_invariant_in_loop_p (inner, stmt))
     return false;
   
@@ -2167,7 +2167,7 @@ can_put_after_inner_loop (struct loop *loop, gimple stmt)
   imm_use_iterator imm_iter;
   use_operand_p use_p;
 
-  if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS))
+  if (gimple_vuse (stmt))
     return false;
   
   FOR_EACH_IMM_USE_FAST (use_p, imm_iter, gimple_assign_lhs (stmt))
@@ -2472,7 +2472,8 @@ perfect_nestify (struct loop *loop,
      it to one just in case.  */
 
   exit_condition = get_loop_exit_condition (newloop);
-  uboundvar = create_tmp_var (integer_type_node, "uboundvar");
+  uboundvar = create_tmp_var (TREE_TYPE (VEC_index (tree, ubounds, 0)),
+                             "uboundvar");
   add_referenced_var (uboundvar);
   stmt = gimple_build_assign (uboundvar, VEC_index (tree, ubounds, 0));
   uboundvar = make_ssa_name (uboundvar, stmt);
@@ -2535,8 +2536,6 @@ perfect_nestify (struct loop *loop,
                 incremented when we do.  */
              for (bsi = gsi_start_bb (bbs[i]); !gsi_end_p (bsi);)
                { 
-                 ssa_op_iter i;
-                 tree n;
                  gimple stmt = gsi_stmt (bsi);
                  
                  if (stmt == exit_condition
@@ -2552,12 +2551,12 @@ perfect_nestify (struct loop *loop,
                     VEC_index (tree, lbounds, 0), replacements, &firstbsi);
 
                  gsi_move_before (&bsi, &tobsi);
-                 
+
                  /* If the statement has any virtual operands, they may
                     need to be rewired because the original loop may
                     still reference them.  */
-                 FOR_EACH_SSA_TREE_OPERAND (n, stmt, i, SSA_OP_ALL_VIRTUALS)
-                   mark_sym_for_renaming (SSA_NAME_VAR (n));
+                 if (gimple_vuse (stmt))
+                   mark_sym_for_renaming (gimple_vop (cfun));
                }
            }