Commit 12f260b0 authored by Andreas Zwinkau's avatar Andreas Zwinkau
Browse files

Removed IR_GRAPH_STATE_BAD_BLOCK symbol

parent 8a98cf06
......@@ -501,7 +501,6 @@ typedef enum {
IR_GRAPH_STATE_KEEP_MUX = 1U << 0, /**< should perform no further optimisations on Mux nodes */
IR_GRAPH_STATE_ARCH_DEP = 1U << 1, /**< should not construct more nodes which irarch potentially breaks down */
IR_GRAPH_STATE_BCONV_ALLOWED = 1U << 2, /**< Conv(mode_b) to Iu is allowed as set command */
IR_GRAPH_STATE_BAD_BLOCK = 1U << 3, /**< a node may have Bad in its block input */
/**
* There are normalisations where there is no "best" representative.
* In this case we first normalise into 1 direction (!NORMALISATION2) and
......@@ -516,7 +515,7 @@ typedef enum {
IR_GRAPH_STATE_IMPLICIT_BITFIELD_MASKING = 1U << 5,
IR_GRAPH_STATE_NO_CRITICAL_EDGES = 1U << 6,
IR_GRAPH_STATE_NO_BAD_BLOCKS = 1U << 7, // TODO must be inverse of IR_GRAPH_STATE_BAD_BLOCK
IR_GRAPH_STATE_NO_BAD_BLOCKS = 1U << 7,
IR_GRAPH_STATE_NO_UNREACHABLE_BLOCKS = 1U << 8,
IR_GRAPH_STATE_ONE_RETURN = 1U << 9,
IR_GRAPH_STATE_CONSISTENT_DOMINANCE = 1U << 10,
......
......@@ -203,7 +203,7 @@ int optimize_graph_df(ir_graph *irg)
/* The following enables unreachable code elimination (=Blocks may be
* Bad). */
set_irg_state(irg, IR_GRAPH_STATE_BAD_BLOCK);
clear_irg_state(irg, IR_GRAPH_STATE_NO_UNREACHABLE_BLOCKS);
/* invalidate info */
set_irg_doms_inconsistent(irg);
......@@ -248,7 +248,7 @@ int optimize_graph_df(ir_graph *irg)
end = get_irg_end(irg);
remove_End_Bads_and_doublets(end);
clear_irg_state(irg, IR_GRAPH_STATE_BAD_BLOCK);
set_irg_state(irg, IR_GRAPH_STATE_NO_UNREACHABLE_BLOCKS);
current_ir_graph = rem;
return changed;
......
......@@ -4598,7 +4598,7 @@ static ir_node *transform_node_Proj(ir_node *proj)
static bool is_block_unreachable(const ir_node *block)
{
const ir_graph *irg = get_irn_irg(block);
if (!is_irg_state(irg, IR_GRAPH_STATE_BAD_BLOCK))
if (is_irg_state(irg, IR_GRAPH_STATE_NO_UNREACHABLE_BLOCKS))
return false;
return get_Block_dom_depth(block) < 0;
}
......@@ -4610,7 +4610,9 @@ static ir_node *transform_node_Block(ir_node *block)
ir_node *bad = NULL;
int i;
if (!is_irg_state(irg, IR_GRAPH_STATE_BAD_BLOCK))
if (is_irg_state(irg, IR_GRAPH_STATE_NO_BAD_BLOCKS))
return block;
if (is_irg_state(irg, IR_GRAPH_STATE_NO_UNREACHABLE_BLOCKS))
return block;
for (i = 0; i < arity; ++i) {
......
......@@ -1763,7 +1763,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_BAD_BLOCK)) {
&& is_irg_state(irg, IR_GRAPH_STATE_NO_BAD_BLOCKS)) {
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);
......
......@@ -44,8 +44,6 @@ void perform_irg_optimization(ir_graph *irg, optdesc_t *opt)
clear_irg_state(irg, IR_GRAPH_STATE_CONSISTENT_OUTS);
if (loopinfo_inconsistent == get_irg_loopinfo_state(irg))
clear_irg_state(irg, IR_GRAPH_STATE_CONSISTENT_LOOPINFO);
if (is_irg_state(irg, IR_GRAPH_STATE_BAD_BLOCK))
clear_irg_state(irg, IR_GRAPH_STATE_NO_BAD_BLOCKS);
if (ir_entity_usage_not_computed == get_irg_entity_usage_state(irg))
clear_irg_state(irg, IR_GRAPH_STATE_CONSISTENT_ENTITY_USAGE);
......
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