aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-operands.h
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2005-04-26 11:37:33 -0600
committerJeff Law <law@gcc.gnu.org>2005-04-26 11:37:33 -0600
commitdb30731aa44d6975021de8b9838297d2e9603cf3 (patch)
tree0d7eb68bfe51ab28e40b7b4005702e4ca1a156ff /gcc/tree-ssa-operands.h
parent5635785a6477d146de01022cc4ef7da97a49a894 (diff)
downloadgcc-db30731aa44d6975021de8b9838297d2e9603cf3.zip
gcc-db30731aa44d6975021de8b9838297d2e9603cf3.tar.gz
gcc-db30731aa44d6975021de8b9838297d2e9603cf3.tar.bz2
tree-flow-inline.h (op_iter_next_must_and_may_def): New.
* tree-flow-inline.h (op_iter_next_must_and_may_def): New. (op_iter_init_must_and_may_def): Likewise. (unmodifiable_var_p): Move to a later point in the file. * tree-ssa-operands.h (FOR_EACH_SSA_MUST_AND_MAY_DEF_OPERAND): New. * tree-ssa-dse.c (need_imm_uses_for): Remove, no longer needed. (dse_record_phis): Directly check for virtual operands rather than using need_imm_uses_for. (dse_optimize_stmt): Handle V_MUST_DEF operands. Handle case where store has multiple V_{MAY,MUST}_DEF operands. From-SVN: r98780
Diffstat (limited to 'gcc/tree-ssa-operands.h')
-rw-r--r--gcc/tree-ssa-operands.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree-ssa-operands.h b/gcc/tree-ssa-operands.h
index 2888319..2d531c8 100644
--- a/gcc/tree-ssa-operands.h
+++ b/gcc/tree-ssa-operands.h
@@ -291,4 +291,11 @@ typedef struct ssa_operand_iterator_d
!op_iter_done (&(ITER)); \
op_iter_next_mustdef (&(KILLVAR), &(DEFVAR), &(ITER)))
+/* This macro executes a loop over the V_{MUST,MAY}_DEF of STMT. The def
+ and kill for each V_{MUST,MAY}_DEF is returned in DEFVAR and KILLVAR.
+ ITER is an ssa_op_iter structure used to control the loop. */
+#define FOR_EACH_SSA_MUST_AND_MAY_DEF_OPERAND(DEFVAR, KILLVAR, STMT, ITER)\
+ for (op_iter_init_must_and_may_def (&(ITER), STMT, &(KILLVAR), &(DEFVAR));\
+ !op_iter_done (&(ITER)); \
+ op_iter_next_must_and_may_def (&(KILLVAR), &(DEFVAR), &(ITER)))
#endif /* GCC_TREE_SSA_OPERANDS_H */