*/
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;
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;
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;
}