+/**
+ * Get the scheduling predecessor of a node.
+ * @param irn The node.
+ * @return The next ir node in the schedule or the block, if the node has no predecessor.
+ * predecessor.
+ */
+static inline ir_node *sched_prev(const ir_node *irn)
+{
+ const sched_info_t *info = get_irn_sched_info(irn);
+ return info->prev;
+}
+
+/**
+ * Get the first node in a block schedule.
+ * @param block The block of which to get the schedule.
+ * @return The first node in the schedule or the block itself
+ * if there is no node in the schedule.
+ */
+static inline ir_node *sched_first(const ir_node *block)
+{
+ assert(is_Block(block) && "Need a block here");
+ return sched_next(block);
+}
+
+/**
+ * Get the last node in a schedule.
+ * @param block The block to get the schedule for.
+ * @return The last ir node in a schedule, or the block itself
+ * if there is no node in the schedule.
+ */
+static inline ir_node *sched_last(const ir_node *block)
+{
+ assert(is_Block(block) && "Need a block here");
+ return sched_prev(block);
+}
+
+/**
+ * Add a node to a block schedule.
+ * @param block The block to whose schedule the node shall be added to.
+ * @param irn The node to add.
+ * @return The given node.
+ */
+void sched_add_before(ir_node *before, ir_node *irn);
+
+
+/**
+ * Add a node to a block schedule.
+ * @param block The block to whose schedule the node shall be added to.
+ * @param irn The node to add.
+ * @return The given node.
+ */
+void sched_add_after(ir_node *after, ir_node *irn);
+
+static inline void sched_init_block(ir_node *block)
+{
+ sched_info_t *info = get_irn_sched_info(block);
+ assert(info->next == NULL && info->time_step == 0);
+ info->next = block;
+ info->prev = block;
+}
+
+static inline void sched_reset(ir_node *node)
+{
+ sched_info_t *info = get_irn_sched_info(node);
+ info->next = NULL;
+ info->prev = NULL;
+}
+
+/**
+ * Remove a node from the scheduled.
+ * @param irn The node.
+ */
+void sched_remove(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.
+ */
+static inline bool sched_comes_after(const ir_node *n1, const ir_node *n2)
+{
+ assert(sched_is_scheduled(n1));
+ assert(sched_is_scheduled(n2));
+ 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);
+}