Commit fe6c9130 authored by Andreas Zwinkau's avatar Andreas Zwinkau
Browse files

Let collect_nodes cope with Bad nodes

parent 72c631f3
...@@ -115,9 +115,15 @@ static void collect_nodes(ir_node *n, void *ctx) ...@@ -115,9 +115,15 @@ static void collect_nodes(ir_node *n, void *ctx)
/* block with a jump label attached cannot be removed. */ /* block with a jump label attached cannot be removed. */
set_Block_removable(n, false); set_Block_removable(n, false);
} }
} else if (is_Bad(n) || is_Jmp(n)) {
/* ignore these */
return; return;
} else if (!is_Jmp(n)) { /* Check for non-empty block. */ } else {
/* Check for non-empty block. */
ir_node *block = get_nodes_block(n); ir_node *block = get_nodes_block(n);
if (is_Bad(block))
return;
set_Block_removable(block, false); set_Block_removable(block, false);
if (is_Proj(n)) { if (is_Proj(n)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment