summaryrefslogtreecommitdiffhomepage
path: root/ir/be/besched.h
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2016-02-29 10:23:43 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2016-02-29 10:24:21 +0100
commit24b2530287c0c5fbce61f86041357a416a156ee5 (patch)
tree4fcbdfe865df4fc911f571df2a588917d4477174 /ir/be/besched.h
parent99c28678990cb92eed8c377ca3c6ed1073569dcf (diff)
besched: Allow the first node in sched_comes_before() to be a block.
Diffstat (limited to 'ir/be/besched.h')
-rw-r--r--ir/be/besched.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/ir/be/besched.h b/ir/be/besched.h
index d4a3142..9a4de46 100644
--- a/ir/be/besched.h
+++ b/ir/be/besched.h
@@ -139,14 +139,15 @@ void sched_replace(ir_node *old, ir_node *irn);
/**
* Checks, if node @p a comes before node @p b.
- * @param a A node.
- * @param b Another node.
+ * @param a A node. May be a block, which represents the start of the
+ * schedule.
+ * @param b Another node. Must not be a block.
* @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_before(const ir_node *a, const ir_node *b)
{
- assert(get_nodes_block(a) == get_nodes_block(b));
+ assert(get_block_const(a) == get_nodes_block(b));
sched_timestep_t const as = sched_get_time_step(a);
sched_timestep_t const bs = sched_get_time_step(b);
return as < bs;