+/**
+ * Checks, if one node is scheduled before another.
+ * @param n1 A node.
+ * @param n2 Another node.
+ * @return 1, if n1 is in front of n2 in the schedule, 0 else.
+ * @note Both nodes must be in the same block.
+ */
+static INLINE int _sched_comes_after(const ir_node *n1, const ir_node *n2)
+{
+ assert(_sched_is_scheduled(n1));
+ assert(_sched_is_scheduled(n2));
+ assert(get_nodes_block(n1) == get_nodes_block(n2));
+ return _sched_get_time_step(n1) < _sched_get_time_step(n2);
+}
+
+/**
+ * A predicate for a node.
+ * @param irn The node.
+ * @param data The custom data.
+ * @return 1 if irn should be skipped. Else 0.
+ */
+typedef int (sched_predicator_t)(const ir_node *irn, void *data);
+
+
+int sched_skip_cf_predicator(const ir_node *irn, void *data);
+int sched_skip_phi_predicator(const ir_node *irn, void *data);
+
+/**
+ * Skip nodes in a schedule.
+ * @param from The node to start from.
+ * @param forward The direction (1 for forward, 0 for backward).
+ * @param predicator The one who decides what is skipped.
+ * @param data Food for the predicator.
+ * @return The first node rejected by the predicator or the block
+ * itself if none was rejected.
+ */
+extern ir_node *sched_skip(ir_node *from, int forward,
+ sched_predicator_t *predicator, void *data);