X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Ftree-ssa-phiprop.c;h=a7bb01195efeeaeb43e7b7e9b780eae9c4449984;hb=40e175e78b8bfcaf6afa0f75e705d62f752cc3e9;hp=bac2303899f1e7847de2994f1a407a93087d0a14;hpb=efbcb6defd4842cee3bc73eec195fe425457ea13;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/tree-ssa-phiprop.c b/gcc/tree-ssa-phiprop.c index bac2303899f..a7bb01195ef 100644 --- a/gcc/tree-ssa-phiprop.c +++ b/gcc/tree-ssa-phiprop.c @@ -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 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,