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
0f76666f
Commit
0f76666f
authored
Feb 26, 2007
by
Matthias Braun
Browse files
correctly handle bad predecessors
[r8667]
parent
ac396855
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/opt/condeval.c
View file @
0f76666f
...
...
@@ -92,7 +92,9 @@ static ir_node *search_def_and_create_phis(ir_node *block, ir_mode *mode)
ir_node
*
phi
;
ir_node
**
in
;
assert
(
!
is_Bad
(
block
));
// This is needed because we create bads sometimes
if
(
is_Bad
(
block
))
return
new_Bad
();
// already processed this block?
if
(
irn_visited
(
block
))
{
...
...
@@ -422,12 +424,13 @@ static void cond_eval(ir_node* block, void* data)
if
(
is_Const
(
left
))
{
tarval
*
tv1
=
get_Const_tarval
(
left
);
tarval
*
tv2
=
get_Const_tarval
(
right
);
ir_node
*
pred
;
if
(
eval_cmp
(
pnc
,
tv1
,
tv2
))
{
ir_node
*
jmp
=
new_r_Jmp
(
irg
,
cond_block
);
set_Block_cfgpred
(
block
,
0
,
jmp
);
pred
=
new_r_Jmp
(
irg
,
cond_block
);
}
else
{
set_Block_cfgpred
(
block
,
0
,
new_Bad
()
)
;
pred
=
new_Bad
();
}
set_Block_cfgpred
(
block
,
0
,
pred
);
*
changed
=
1
;
set_irg_doms_inconsistent
(
irg
);
set_irg_extblk_inconsistent
(
irg
);
...
...
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