- irg_walk_graph(irg, NULL, apply_result, NULL);
+ env.modified = 0;
+ irg_walk_graph(irg, NULL, apply_result, &env);
+
+ if (env.modified) {
+ /* control flow might changed */
+ set_irg_outs_inconsistent(irg);
+ set_irg_extblk_inconsistent(irg);
+ set_irg_doms_inconsistent(irg);
+ set_irg_loopinfo_inconsistent(irg);
+ set_irg_entity_usage_state(irg, ir_entity_usage_not_computed);
+ }
+
+ ir_free_resources(irg, IR_RESOURCE_IRN_LINK | IR_RESOURCE_PHI_LIST);