Commit e9bb88e8 authored by Matthias Braun's avatar Matthias Braun
Browse files

rename NO_BAD_BLOCKS to NO_BADS, remove unnecessary implication from opt_manage

parent 255a9cc7
......@@ -511,8 +511,8 @@ typedef enum {
IR_GRAPH_STATE_OPTIMIZE_UNREACHABLE_CODE = 1U << 4,
/** graph contains no critical edges */
IR_GRAPH_STATE_NO_CRITICAL_EDGES = 1U << 5,
/** graph contains no Bads */
IR_GRAPH_STATE_NO_BAD_BLOCKS = 1U << 6,
/** graph contains no Bad nodes */
IR_GRAPH_STATE_NO_BADS = 1U << 6,
/**
* there exists no (obviously) unreachable code in the graph.
* Unreachable in this context is code that you can't reach by following
......
......@@ -1760,7 +1760,7 @@ int irn_verify_irg(const ir_node *n, ir_graph *irg)
ir_printf("node %+F", n);
);
} else if (!is_Block(n) && is_irn_pinned_in_irg(n)
&& is_irg_state(irg, IR_GRAPH_STATE_NO_BAD_BLOCKS)) {
&& is_irg_state(irg, IR_GRAPH_STATE_NO_BADS)) {
ASSERT_AND_RET_DBG(is_Block(get_nodes_block(n)) || is_Anchor(n),
"block input is not a block", 0,
ir_printf("node %+F", n);
......
......@@ -66,7 +66,7 @@ void remove_unreachable_blocks(ir_graph *irg)
if (changed) {
edges_deactivate(irg);
clear_irg_state(irg, IR_GRAPH_STATE_CONSISTENT_OUTS);
clear_irg_state(irg, IR_GRAPH_STATE_NO_BAD_BLOCKS);
clear_irg_state(irg, IR_GRAPH_STATE_NO_BADS);
}
set_irg_state(irg, IR_GRAPH_STATE_NO_UNREACHABLE_CODE);
}
......@@ -3607,7 +3607,7 @@ static ir_graph_state_t do_combo(ir_graph *irg)
optdesc_t opt_combo = {
"combo",
IR_GRAPH_STATE_NO_BAD_BLOCKS | IR_GRAPH_STATE_CONSISTENT_OUTS | IR_GRAPH_STATE_CONSISTENT_LOOPINFO,
IR_GRAPH_STATE_NO_BADS | IR_GRAPH_STATE_CONSISTENT_OUTS | IR_GRAPH_STATE_CONSISTENT_LOOPINFO,
do_combo,
};
......
......@@ -25,10 +25,6 @@ void perform_irg_optimization(ir_graph *irg, optdesc_t *opt)
ir_graph_state_t required = opt->requirements;
const bool dump = get_irp_optimization_dumps();
/* no bad block requires no unreachable code */
if (required & IR_GRAPH_STATE_NO_BAD_BLOCKS)
required |= IR_GRAPH_STATE_NO_UNREACHABLE_CODE;
/** Some workarounds because information is currently duplicated */
// FIXME should not be necessary!
if (loopinfo_inconsistent == get_irg_loopinfo_state(irg))
......@@ -39,7 +35,7 @@ void perform_irg_optimization(ir_graph *irg, optdesc_t *opt)
PREPARE(IR_GRAPH_STATE_ONE_RETURN, normalize_one_return)
PREPARE(IR_GRAPH_STATE_NO_CRITICAL_EDGES, remove_critical_cf_edges)
PREPARE(IR_GRAPH_STATE_NO_UNREACHABLE_CODE, remove_unreachable_blocks)
PREPARE(IR_GRAPH_STATE_NO_BAD_BLOCKS, remove_bads)
PREPARE(IR_GRAPH_STATE_NO_BADS, remove_bads)
PREPARE(IR_GRAPH_STATE_CONSISTENT_DOMINANCE, assure_doms)
PREPARE(IR_GRAPH_STATE_CONSISTENT_POSTDOMINANCE, assure_postdoms)
PREPARE(IR_GRAPH_STATE_CONSISTENT_OUT_EDGES, edges_assure)
......@@ -64,7 +60,7 @@ void perform_irg_optimization(ir_graph *irg, optdesc_t *opt)
#define INVALIDATE(state,func) if (!(state & new_irg_state)) {clear_irg_state(irg,state); func(irg);}
INVALIDATE(IR_GRAPH_STATE_NO_CRITICAL_EDGES, nop)
INVALIDATE(IR_GRAPH_STATE_NO_UNREACHABLE_CODE, nop)
INVALIDATE(IR_GRAPH_STATE_NO_BAD_BLOCKS, nop)
INVALIDATE(IR_GRAPH_STATE_NO_BADS, nop)
INVALIDATE(IR_GRAPH_STATE_ONE_RETURN, nop)
INVALIDATE(IR_GRAPH_STATE_CONSISTENT_DOMINANCE, nop)
INVALIDATE(IR_GRAPH_STATE_CONSISTENT_POSTDOMINANCE, nop)
......
Markdown is supported
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