+ if (has_Block_entity(block)) {
+ /* move the label to the successor block */
+ ir_entity *entity = get_Block_entity(block);
+ set_Block_entity(succ_block, entity);
+ }
+
+ /* there can be some non-scheduled Pin nodes left in the block, move them
+ * to the succ block (Pin) or pred block (Sync) */
+ foreach_out_edge_safe(block, edge, next) {
+ node = get_edge_src_irn(edge);
+
+ if (node == jump)
+ continue;
+ if (is_Block(node)) {
+ /* a Block->Block edge: This should be the MacroBlock
+ edge, ignore it. */
+ assert(get_Block_MacroBlock(node) == block && "Wrong Block->Block edge");
+ continue;
+ }
+ /* we simply kill Pins, because there are some strange interactions
+ * between jump threading, which produce PhiMs with Pins, we simply
+ * kill the pins here, everything is scheduled anyway */
+ if (is_Pin(node)) {
+ exchange(node, get_Pin_op(node));
+ continue;
+ }
+ if (is_Sync(node)) {
+ set_nodes_block(node, get_nodes_block(pred));
+ continue;
+ }
+ if (is_End(node)) { /* End-keep, reroute it to the successor */
+ int pos = get_edge_src_pos(edge);
+ set_irn_n(node, pos, succ_block);
+ continue;
+ }
+ panic("Unexpected node %+F in block %+F with empty schedule", node, block);