summaryrefslogtreecommitdiffhomepage
path: root/ir/be/besched.h
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2012-12-13 21:06:01 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2012-12-15 00:05:47 +0100
commitb38e2c8fb2d6b9f713f0948a536a28b623b0732b (patch)
treed92dd676d9dfa458d3c415c0e4ca0dabe52bb92e /ir/be/besched.h
parent25313dd42cf428b81b32ca83296ef3dfac9702b7 (diff)
besched: Change sched_foreach_from(sched_next(x), y) to sched_foreach_after(x, y).
Diffstat (limited to 'ir/be/besched.h')
-rw-r--r--ir/be/besched.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/ir/be/besched.h b/ir/be/besched.h
index 6e97780..6451ab0 100644
--- a/ir/be/besched.h
+++ b/ir/be/besched.h
@@ -156,8 +156,8 @@ static inline bool sched_comes_after(const ir_node *n1, const ir_node *n2)
return sched_get_time_step(n1) < sched_get_time_step(n2);
}
-#define sched_foreach_from(from, irn) \
- for (ir_node *irn = from; !sched_is_end(irn); irn = sched_next(irn))
+#define sched_foreach_after(after, irn) \
+ for (ir_node *irn = (after); !sched_is_end(irn = sched_next(irn));)
#define sched_foreach_reverse_from(from, irn) \
for (ir_node *irn = from; !sched_is_begin(irn); irn = sched_prev(irn))
@@ -168,7 +168,7 @@ static inline bool sched_comes_after(const ir_node *n1, const ir_node *n2)
* @param irn A ir node pointer used as an iterator.
*/
#define sched_foreach(block,irn) \
- sched_foreach_from(sched_first(block), irn)
+ sched_foreach_after((assert(is_Block(block)), block), irn)
/**
* A shorthand macro for reversely iterating over a schedule.