summaryrefslogtreecommitdiffhomepage
path: root/ir/be/besched.h
diff options
context:
space:
mode:
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>2008-11-27 13:53:10 +0100
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>2008-11-27 13:53:10 +0100
commitc318fd193741996d738fa0e65e01d951a64d6086 (patch)
tree3dd56929367c8ecab8e6ac443fbbf1ff1148c7bc /ir/be/besched.h
parentc76a3b7119d5639ea118510250f61cbadd76fcfc (diff)
- add a macro to iterate over the Phi nodes of a block schedule only
[r24055]
Diffstat (limited to 'ir/be/besched.h')
-rw-r--r--ir/be/besched.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ir/be/besched.h b/ir/be/besched.h
index 5352f5e..a7b8699 100644
--- a/ir/be/besched.h
+++ b/ir/be/besched.h
@@ -80,6 +80,14 @@ void sched_remove(const ir_node *irn);
sched_foreach_reverse_from(sched_last(block), irn)
/**
+ * A shorthand macro for iterating over all Phi nodes of a schedule.
+ * @param block The block.
+ * @param phi A ir node pointer used as an iterator.
+ */
+#define sched_foreach_Phi(block,phi) \
+ for (phi = sched_first(block); is_Phi(phi); phi = sched_next(phi))
+
+/**
* Removes dead nodes from schedule
* @param irg the graph
*/