diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2011-06-08 19:39:12 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2011-06-08 19:39:12 +0000 |
commit | 49931fcb6ebd4100b95f190fc7b780b7426a9e5a (patch) | |
tree | d9d6317d1ce0f5f397999b2a960a0dd9f00eb49f | |
parent | 2427150138deb7c8efff398b3d9b1915021efd44 (diff) | |
download | gcc-49931fcb6ebd4100b95f190fc7b780b7426a9e5a.zip gcc-49931fcb6ebd4100b95f190fc7b780b7426a9e5a.tar.gz gcc-49931fcb6ebd4100b95f190fc7b780b7426a9e5a.tar.bz2 |
tree-flow-inline.h (op_iter_init): Reject GIMPLE_PHI stmts.
* tree-flow-inline.h (op_iter_init): Reject GIMPLE_PHI stmts.
(num_ssa_operands): Likewise.
(op_iter_init_phiuse): Forward-declare.
(delink_stmt_imm_use): Iterate with FOR_EACH_PHI_OR_STMT_USE.
From-SVN: r174815
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/tree-flow-inline.h | 11 |
2 files changed, 15 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fe061ba..297fc79 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-06-08 Alexandre Oliva <aoliva@redhat.com> + + * tree-flow-inline.h (op_iter_init): Reject GIMPLE_PHI stmts. + (num_ssa_operands): Likewise. + (op_iter_init_phiuse): Forward-declare. + (delink_stmt_imm_use): Iterate with FOR_EACH_PHI_OR_STMT_USE. + 2011-06-08 Nick Clifton <nickc@redhat.com> * doc/invoke.texi (ARM Options): Update description of diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h index dcbe355..b9c5e16 100644 --- a/gcc/tree-flow-inline.h +++ b/gcc/tree-flow-inline.h @@ -737,9 +737,11 @@ clear_and_done_ssa_iter (ssa_op_iter *ptr) static inline void op_iter_init (ssa_op_iter *ptr, gimple stmt, int flags) { - /* We do not support iterating over virtual defs or uses without + /* PHI nodes require a different iterator initialization path. We + do not support iterating over virtual defs or uses without iterating over defs or uses at the same time. */ - gcc_checking_assert ((!(flags & SSA_OP_VDEF) || (flags & SSA_OP_DEF)) + gcc_checking_assert (gimple_code (stmt) != GIMPLE_PHI + && (!(flags & SSA_OP_VDEF) || (flags & SSA_OP_DEF)) && (!(flags & SSA_OP_VUSE) || (flags & SSA_OP_USE))); ptr->defs = (flags & (SSA_OP_DEF|SSA_OP_VDEF)) ? gimple_def_ops (stmt) : NULL; if (!(flags & SSA_OP_VDEF) @@ -868,11 +870,14 @@ num_ssa_operands (gimple stmt, int flags) tree t; int num = 0; + gcc_checking_assert (gimple_code (stmt) != GIMPLE_PHI); FOR_EACH_SSA_TREE_OPERAND (t, stmt, iter, flags) num++; return num; } +static inline use_operand_p +op_iter_init_phiuse (ssa_op_iter *ptr, gimple phi, int flags); /* Delink all immediate_use information for STMT. */ static inline void @@ -882,7 +887,7 @@ delink_stmt_imm_use (gimple stmt) use_operand_p use_p; if (ssa_operands_active ()) - FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_ALL_USES) + FOR_EACH_PHI_OR_STMT_USE (use_p, stmt, iter, SSA_OP_ALL_USES) delink_imm_use (use_p); } |