summaryrefslogtreecommitdiffhomepage
path: root/ir/be/besched.h
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2012-12-13 21:11:21 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2012-12-15 00:06:58 +0100
commit2d4cb2720430d39651ddb33d9b342f69bd757a75 (patch)
tree7de62d5aea0cb755fb840956fc6d789d94e0ea8c /ir/be/besched.h
parentb38e2c8fb2d6b9f713f0948a536a28b623b0732b (diff)
besched: Change sched_foreach_reverse_from(sched_prev(x), y) to sched_foreach_reverse_before(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 6451ab0..7b21400 100644
--- a/ir/be/besched.h
+++ b/ir/be/besched.h
@@ -159,8 +159,8 @@ static inline bool sched_comes_after(const ir_node *n1, const ir_node *n2)
#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))
+#define sched_foreach_reverse_before(before, irn) \
+ for (ir_node *irn = (before); !sched_is_begin(irn = sched_prev(irn));)
/**
* A shorthand macro for iterating over a schedule.
@@ -176,7 +176,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_reverse(block,irn) \
- sched_foreach_reverse_from(sched_last(block), irn)
+ sched_foreach_reverse_before((assert(is_Block(block)), block), irn)
/**
* Type for a function scheduling a graph