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
0e6672f3
Commit
0e6672f3
authored
Aug 01, 2008
by
Matthias Braun
Browse files
small optimisation (avoids edges_notify_edge)
[r20892]
parent
aa56108b
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ana/irouts.c
View file @
0e6672f3
...
...
@@ -309,15 +309,19 @@ static int _count_outs(ir_node *n) {
for
(
i
=
start
;
i
<
irn_arity
;
++
i
)
{
/* Optimize Tuples. They annoy if walking the cfg. */
ir_node
*
pred
=
skip_Tuple
(
get_irn_n
(
n
,
i
));
set_irn_n
(
n
,
i
,
pred
);
ir_node
*
pred
=
get_irn_n
(
n
,
i
);
ir_node
*
skipped_pred
=
skip_Tuple
(
pred
);
if
(
skipped_pred
!=
pred
)
{
set_irn_n
(
n
,
i
,
skipped_pred
);
}
/* count Def-Use edges for predecessors */
if
(
irn_not_visited
(
pred
))
res
+=
_count_outs
(
pred
);
if
(
irn_not_visited
(
skipped_
pred
))
res
+=
_count_outs
(
skipped_
pred
);
/*count my Def-Use edges */
pred
->
out
=
INT_TO_PTR
(
PTR_TO_INT
(
pred
->
out
)
+
1
);
skipped_
pred
->
out
=
INT_TO_PTR
(
PTR_TO_INT
(
skipped_
pred
->
out
)
+
1
);
}
return
res
;
}
...
...
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