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
14b5cf62
Commit
14b5cf62
authored
Jan 22, 2009
by
Michael Beck
Browse files
- do not create useless Confirm(x == true) and Confirm(x == false) Confirms,
use the constants directly [r25324]
parent
af011537
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ana/irconsconfirm.c
View file @
14b5cf62
...
...
@@ -209,10 +209,13 @@ static void handle_modeb(ir_node *block, ir_node *selector, pn_Cond pnc, env_t *
if
(
c_b
==
NULL
)
{
ir_node
*
c_true
=
new_Const
(
tarval_b_true
);
ir_node
*
c_false
=
new_Const
(
tarval_b_false
);
c_b
=
new_r_Confirm
(
current_ir_graph
,
cond_block
,
selector
,
pnc
==
pn_Cond_true
?
c_true
:
c_false
,
pn_Cmp_Eq
);
c_o
=
new_r_Confirm
(
current_ir_graph
,
cond_block
,
selector
,
pnc
==
pn_Cond_false
?
c_true
:
c_false
,
pn_Cmp_Eq
);
if
(
pnc
==
pn_Cond_true
)
{
c_b
=
c_true
;
c_o
=
c_false
;
}
else
{
c_b
=
c_false
;
c_o
=
c_true
;
}
}
for
(
i
=
n
-
1
;
i
>=
0
;
--
i
)
{
ir_node
*
pred_blk
=
get_Block_cfgpred_block
(
user_blk
,
i
);
...
...
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