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
9b348776
Commit
9b348776
authored
May 16, 2012
by
Matthias Braun
Browse files
create Bad instead of Phi0 for unreachable blocks
parent
86fe6a80
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ir/ircons.c
View file @
9b348776
...
...
@@ -271,14 +271,19 @@ static ir_node *get_r_value_internal(ir_node *block, int pos, ir_mode *mode)
if
(
get_Block_matured
(
block
))
{
int
arity
=
get_irn_arity
(
block
);
/* no predecessors: use unknown value */
if
(
arity
==
0
&&
block
==
get_irg_start_block
(
get_irn_irg
(
block
)))
{
if
(
default_initialize_local_variable
!=
NULL
)
{
ir_node
*
rem
=
get_r_cur_block
(
irg
);
set_r_cur_block
(
irg
,
block
);
res
=
default_initialize_local_variable
(
irg
,
mode
,
pos
-
1
);
set_r_cur_block
(
irg
,
rem
);
if
(
arity
==
0
)
{
if
(
block
==
get_irg_start_block
(
irg
))
{
if
(
default_initialize_local_variable
!=
NULL
)
{
ir_node
*
rem
=
get_r_cur_block
(
irg
);
set_r_cur_block
(
irg
,
block
);
res
=
default_initialize_local_variable
(
irg
,
mode
,
pos
-
1
);
set_r_cur_block
(
irg
,
rem
);
}
else
{
res
=
new_r_Unknown
(
irg
,
mode
);
}
}
else
{
res
=
new_r_Unknown
(
irg
,
mode
);
/* unreachable block, use Bad */
res
=
new_r_Bad
(
irg
,
mode
);
}
/* one predecessor just use its value */
}
else
if
(
arity
==
1
)
{
...
...
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