OSDN Git Service

2010-04-26 Jack Howarth <howarth@bromo.med.uc.edu>
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa-phiprop.c
index bac2303..a7bb011 100644 (file)
@@ -1,5 +1,5 @@
 /* Backward propagation of indirect loads through PHIs.
-   Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
    Contributed by Richard Guenther <rguenther@suse.de>
 
 This file is part of GCC.
@@ -22,13 +22,13 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
-#include "ggc.h"
 #include "tree.h"
-#include "rtl.h"
 #include "tm_p.h"
 #include "basic-block.h"
 #include "timevar.h"
 #include "diagnostic.h"
+#include "tree-pretty-print.h"
+#include "gimple-pretty-print.h"
 #include "tree-flow.h"
 #include "tree-pass.h"
 #include "tree-dump.h"
@@ -190,11 +190,8 @@ phiprop_insert_phi (basic_block bb, gimple phi, gimple use_stmt,
        {
          gcc_assert (TREE_CODE (old_arg) == ADDR_EXPR);
          old_arg = TREE_OPERAND (old_arg, 0);
-         new_var = create_tmp_var (TREE_TYPE (old_arg), NULL);
+         new_var = create_tmp_reg (TREE_TYPE (old_arg), NULL);
          tmp = gimple_build_assign (new_var, unshare_expr (old_arg));
-         if (TREE_CODE (TREE_TYPE (old_arg)) == COMPLEX_TYPE
-             || TREE_CODE (TREE_TYPE (old_arg)) == VECTOR_TYPE)
-           DECL_GIMPLE_REG_P (new_var) = 1;
          gcc_assert (is_gimple_reg (new_var));
          add_referenced_var (new_var);
          new_var = make_ssa_name (new_var, tmp);
@@ -298,7 +295,7 @@ propagate_with_phi (basic_block bb, gimple phi, struct phiprop_d *phivn,
 
       /* Check whether this is a load of *ptr.  */
       if (!(is_gimple_assign (use_stmt)
-           && TREE_CODE (gimple_assign_lhs (use_stmt)) == SSA_NAME 
+           && TREE_CODE (gimple_assign_lhs (use_stmt)) == SSA_NAME
            && gimple_assign_rhs_code (use_stmt) == INDIRECT_REF
            && TREE_OPERAND (gimple_assign_rhs1 (use_stmt), 0) == ptr
            /* We cannot replace a load that may throw or is volatile.  */
@@ -355,7 +352,7 @@ tree_ssa_phiprop (void)
 {
   VEC(basic_block, heap) *bbs;
   struct phiprop_d *phivn;
-  bool did_something = false; 
+  bool did_something = false;
   basic_block bb;
   gimple_stmt_iterator gsi;
   unsigned i;
@@ -388,7 +385,7 @@ gate_phiprop (void)
   return flag_tree_phiprop;
 }
 
-struct gimple_opt_pass pass_phiprop = 
+struct gimple_opt_pass pass_phiprop =
 {
  {
   GIMPLE_PASS,