/* 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.
#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"
{
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);
/* 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. */
{
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;
return flag_tree_phiprop;
}
-struct gimple_opt_pass pass_phiprop =
+struct gimple_opt_pass pass_phiprop =
{
{
GIMPLE_PASS,