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