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

remove_bads must preserve block entities

They might be the target of an ijmp afterall.
parent 5b884ea1
......@@ -57,6 +57,7 @@ static void block_remove_bads(ir_node *block, void *env)
int *changed = (int *)env;
int i, j;
ir_node **new_in, *new_block, *phi;
ir_entity *block_entity = NULL;
const int max = get_irn_arity(block);
const int new_max = count_non_bads(block);
assert(max >= new_max);
......@@ -88,6 +89,9 @@ static void block_remove_bads(ir_node *block, void *env)
}
new_block = new_r_Block(get_irn_irg(block), new_max, new_in);
block_entity = get_Block_entity(block);
if (block_entity)
set_Block_entity(new_block, block_entity);
/* 2. Remove inputs on Phis, where the block input is Bad. */
phi = get_Block_phis(block);
......
Supports Markdown
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