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
3aeb68ad
Commit
3aeb68ad
authored
Jul 13, 2012
by
Christoph Mallon
Browse files
Use foreach_out_edge_safe() instead of reimplementing it.
parent
a84d17b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ana/irconsconfirm.c
View file @
3aeb68ad
...
...
@@ -155,12 +155,11 @@ static void handle_modeb(ir_node *block, ir_node *selector, pn_Cond pnc, env_t *
ir_node
*
c_b
=
NULL
,
*
c_o
=
NULL
;
const
ir_edge_t
*
edge
,
*
next
;
for
(
edge
=
get_irn
_out_edge_
first
(
selector
);
edge
;
edge
=
next
)
{
for
each
_out_edge_
safe
(
selector
,
edge
,
next
)
{
ir_node
*
user
=
get_edge_src_irn
(
edge
);
int
pos
=
get_edge_src_pos
(
edge
);
ir_node
*
user_blk
=
get_effective_use_block
(
user
,
pos
);
next
=
get_irn_out_edge_next
(
selector
,
edge
);
if
(
block_dominates
(
block
,
user_blk
))
{
/*
* Ok, we found a usage of selector in a block
...
...
@@ -300,12 +299,11 @@ static void handle_if(ir_node *block, ir_node *cmp, ir_relation rel, env_t *env)
*/
if
(
rel
==
ir_relation_equal
)
{
cond_block
=
get_Block_cfgpred_block
(
block
,
0
);
for
(
edge
=
get_irn_out_edge_first
(
left
);
edge
;
edge
=
next
)
{
for
each_out_edge_safe
(
left
,
edge
,
next
)
{
ir_node
*
user
=
get_edge_src_irn
(
edge
);
int
pos
=
get_edge_src_pos
(
edge
);
ir_node
*
blk
=
get_effective_use_block
(
user
,
pos
);
next
=
get_irn_out_edge_next
(
left
,
edge
);
if
(
block_dominates
(
block
,
blk
))
{
/*
* Ok, we found a usage of left in a block
...
...
Write
Preview
Supports
Markdown
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