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
fd63e74e
Commit
fd63e74e
authored
Apr 23, 2007
by
Michael Beck
Browse files
do not coalesce ignore nodes: additional case fixed
[r13454]
parent
7ebe4f36
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/becopyopt.c
View file @
fd63e74e
...
...
@@ -420,22 +420,25 @@ static void co_collect_units(ir_node *irn, void *env) {
/* Else insert the argument of the phi to the members of this ou */
DBG
((
dbg
,
LEVEL_1
,
"
\t
Member: %+F
\n
"
,
arg
));
/* Check if arg has occurred at a prior position in the arg/list */
arg_pos
=
0
;
for
(
o
=
0
;
o
<
unit
->
node_count
;
++
o
)
if
(
unit
->
nodes
[
o
]
==
arg
)
{
arg_pos
=
o
;
break
;
if
(
!
arch_irn_is
(
co
->
aenv
,
arg
,
ignore
))
{
/* Check if arg has occurred at a prior position in the arg/list */
arg_pos
=
0
;
for
(
o
=
1
;
o
<
unit
->
node_count
;
++
o
)
{
if
(
unit
->
nodes
[
o
]
==
arg
)
{
arg_pos
=
o
;
break
;
}
}
if
(
!
arg_pos
)
{
/* a new argument */
/* insert node, set costs */
unit
->
nodes
[
unit
->
node_count
]
=
arg
;
unit
->
costs
[
unit
->
node_count
]
=
co
->
get_costs
(
co
,
irn
,
arg
,
i
);
unit
->
node_count
++
;
}
else
{
/* arg has occured before in same phi */
/* increase costs for existing arg */
unit
->
costs
[
arg_pos
]
+=
co
->
get_costs
(
co
,
irn
,
arg
,
i
);
if
(
!
arg_pos
)
{
/* a new argument */
/* insert node, set costs */
unit
->
nodes
[
unit
->
node_count
]
=
arg
;
unit
->
costs
[
unit
->
node_count
]
=
co
->
get_costs
(
co
,
irn
,
arg
,
i
);
unit
->
node_count
++
;
}
else
{
/* arg has occured before in same phi */
/* increase costs for existing arg */
unit
->
costs
[
arg_pos
]
+=
co
->
get_costs
(
co
,
irn
,
arg
,
i
);
}
}
}
unit
->
nodes
=
xrealloc
(
unit
->
nodes
,
unit
->
node_count
*
sizeof
(
*
unit
->
nodes
));
...
...
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