Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
12f260b0
Commit
12f260b0
authored
Sep 07, 2011
by
Andreas Zwinkau
Browse files
Removed IR_GRAPH_STATE_BAD_BLOCK symbol
parent
8a98cf06
Changes
5
Hide whitespace changes
Inline
Side-by-side
include/libfirm/irgraph.h
View file @
12f260b0
...
...
@@ -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
,
...
...
ir/ir/irgopt.c
View file @
12f260b0
...
...
@@ -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
_BLOCK
S
);
/* 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
_BLOCK
S
);
current_ir_graph
=
rem
;
return
changed
;
...
...
ir/ir/iropt.c
View file @
12f260b0
...
...
@@ -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
_BLOCK
S
))
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
)
{
...
...
ir/ir/irverify.c
View file @
12f260b0
...
...
@@ -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_BLOCK
S
))
{
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
);
...
...
ir/opt/opt_manage.c
View file @
12f260b0
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment