+ ir_entity *entity = get_irg_entity(irg);
+ ir_type *type = get_entity_type(entity);
+
+ config = *nconfig;
+ lowered_nodes = new_pdeq();
+ lowered_type = NULL;
+
+ /* ensure no optimisation touches muxes anymore */
+ set_irg_state(irg, IR_GRAPH_STATE_KEEP_MUX);
+
+ ir_reserve_resources(irg, IR_RESOURCE_IRN_LINK);
+
+ adjust_method_type(type);
+
+ set_opt_allow_conv_b(0);
+ irg_walk_graph(irg, firm_clear_link, NULL, NULL);
+ irg_walk_graph(irg, lower_mode_b_walker, NULL, NULL);
+
+ while (!pdeq_empty(lowered_nodes)) {
+ ir_node *node = (ir_node*) pdeq_getr(lowered_nodes);
+ maybe_kill_node(node);
+ }
+ del_pdeq(lowered_nodes);
+
+ ir_free_resources(irg, IR_RESOURCE_IRN_LINK);