- * Blocks become dead and new Returns were deleted, so dominator, outs and loop are inconsistent,
- * trouts and callee-state should be still valid
- */
- set_irg_doms_inconsistent(irg);
- set_irg_extblk_inconsistent(irg); /* may not be needed */
- set_irg_outs_inconsistent(irg);
- set_irg_loopinfo_inconsistent(current_ir_graph);
+ * Blocks become dead and new Returns were deleted, so dominator, outs and
+ * loop are inconsistent, trouts and callee-state should be still valid */
+ clear_irg_state(irg, IR_GRAPH_STATE_CONSISTENT_DOMINANCE
+ | IR_GRAPH_STATE_CONSISTENT_POSTDOMINANCE
+ | IR_GRAPH_STATE_ONE_RETURN
+ | IR_GRAPH_STATE_CONSISTENT_OUTS
+ | IR_GRAPH_STATE_NO_UNREACHABLE_CODE
+ | IR_GRAPH_STATE_NO_BADS
+ | IR_GRAPH_STATE_VALID_EXTENDED_BLOCKS);
+}
+
+/* Create a graph pass. */
+ir_graph_pass_t *normalize_n_returns_pass(const char *name)
+{
+ return def_graph_pass(name ? name : "n_rets", normalize_n_returns);