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
3ed3ee8c
Commit
3ed3ee8c
authored
Feb 04, 2015
by
yb9976
Browse files
Post dominance pre number should always be assigned.
We should reach all blocks via control flow or keep alive edges.
parent
61702136
Changes
1
Show whitespace changes
Inline
Side-by-side
ir/ana/irdom.c
View file @
3ed3ee8c
...
...
@@ -75,11 +75,7 @@ void set_Block_idom(ir_node *block, ir_node *n)
ir_node
*
get_Block_ipostdom
(
const
ir_node
*
block
)
{
if
(
get_Block_postdom_depth
(
block
)
==
-
1
)
{
/* This block is not reachable from Start */
ir_graph
*
irg
=
get_irn_irg
(
block
);
return
new_r_Bad
(
irg
,
mode_BB
);
}
assert
(
get_Block_postdom_depth
(
block
)
!=
-
1
);
return
get_pdom_info_const
(
block
)
->
idom
;
}
...
...
@@ -623,10 +619,9 @@ void compute_postdoms(ir_graph *irg)
unsigned
irn_arity
=
get_Block_n_cfg_outs_ka
(
w
->
block
);
for
(
unsigned
j
=
0
;
j
<
irn_arity
;
j
++
)
{
const
ir_node
*
succ
=
get_Block_cfg_out_ka
(
w
->
block
,
j
);
if
(
get_Block_postdom_pre_num
(
succ
)
==
-
1
)
continue
;
/* endless-loop */
const
tmp_dom_info
*
u
=
dom_eval
(
&
tdi_list
[
get_Block_postdom_pre_num
(
succ
)]);
const
int
pre_num
=
get_Block_postdom_pre_num
(
succ
);
assert
(
pre_num
!=
-
1
);
const
tmp_dom_info
*
u
=
dom_eval
(
&
tdi_list
[
pre_num
]);
if
(
u
->
semi
<
w
->
semi
)
w
->
semi
=
u
->
semi
;
}
...
...
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