summaryrefslogtreecommitdiffhomepage
path: root/ir/be/besched.h
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2014-07-16 13:49:57 +0200
committerMatthias Braun <matze@braunis.de>2014-07-18 10:04:10 +0200
commit8f1ba92ac594742f9b73902256cdb3a60b29b730 (patch)
tree40ae7273a730fa77019743913be5b5fb9c7b23eb /ir/be/besched.h
parent772df9793f70bae91b5bd75e3f5f4d3295000f9f (diff)
cleanup beintlive_t
- Remove value_dominates_intrablock()/value_strictly_dominates_intrablock() and use sched_comes_before() instead - Use bool instead of int return types. - Assert that we don't check if a node interferes with itself as that is nearly always a bug in the code.
Diffstat (limited to 'ir/be/besched.h')
-rw-r--r--ir/be/besched.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/ir/be/besched.h b/ir/be/besched.h
index 7ec653d..61359a9 100644
--- a/ir/be/besched.h
+++ b/ir/be/besched.h
@@ -144,16 +144,17 @@ void sched_remove(ir_node *irn);
void sched_replace(ir_node *old, ir_node *irn);
/**
- * Checks, if one node is scheduled before another.
- * @param n1 A node.
- * @param n2 Another node.
- * @return true, if n1 is in front of n2 in the schedule, false else.
- * @note Both nodes must be in the same block.
+ * Checks, if node @p a comes before node @p b.
+ * @param a A node.
+ * @param b Another node.
+ * @return true, if a is in front of b in the schedule, false else.
+ * @note Both nodes must be in the same block.
*/
-static inline bool sched_comes_after(const ir_node *n1, const ir_node *n2)
+static inline bool sched_comes_before(const ir_node *a, const ir_node *b)
{
- assert((is_Block(n1) ? n1 : get_nodes_block(n1)) == (is_Block(n2) ? n2 : get_nodes_block(n2)));
- return sched_get_time_step(n1) < sched_get_time_step(n2);
+ sched_timestep_t const as = sched_get_time_step(a);
+ sched_timestep_t const bs = sched_get_time_step(b);
+ return as < bs;
}
#define sched_foreach_after(after, irn) \