Commit 73e9e77d authored by Matthias Braun's avatar Matthias Braun
Browse files

fix lower_copyB not invalidating irn_outs

parent a7953ba2
......@@ -66,7 +66,7 @@ static ir_mode *get_ir_mode(unsigned bytes)
*/
static void lower_copyb_nodes(ir_node *irn, unsigned mode_bytes)
{
ir_graph *irg = current_ir_graph;
ir_graph *irg = get_irn_irg(irn);
unsigned size;
unsigned offset;
ir_mode *mode;
......@@ -167,10 +167,8 @@ static void find_copyb_nodes(ir_node *irn, void *ctx)
void lower_CopyB(ir_graph *irg, unsigned max_size, unsigned native_mode_bytes)
{
walk_env_t env;
entry_t *entry;
ir_graph *rem = current_ir_graph;
current_ir_graph = irg;
entry_t *entry;
bool changed = false;
obstack_init(&env.obst);
env.max_size = max_size;
......@@ -179,8 +177,12 @@ void lower_CopyB(ir_graph *irg, unsigned max_size, unsigned native_mode_bytes)
list_for_each_entry(entry_t, entry, &env.list, list) {
lower_copyb_nodes(entry->copyb, native_mode_bytes);
changed = true;
}
if (changed) {
set_irg_outs_inconsistent(irg);
}
obstack_free(&env.obst, NULL);
current_ir_graph = rem;
}
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