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
3a3c9a98
Commit
3a3c9a98
authored
Jul 26, 2011
by
yb9976
Browse files
Added local opt Phi(Pin,...,Pin) -> Pin(Phi(...)).
This fixes opt/fehler194.c.
parent
c246d23d
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ir/iropt.c
View file @
3a3c9a98
...
...
@@ -4640,8 +4640,34 @@ static ir_node *transform_node_Phi(ir_node *phi)
}
}
/* Move Pin nodes down through Phi nodes. */
if
(
mode
==
mode_M
)
{
n
=
get_irn_arity
(
phi
);
/* Beware of Phi0 */
if
(
n
>
0
)
{
ir_node
**
in
;
ir_node
*
new_phi
;
NEW_ARR_A
(
ir_node
*
,
in
,
n
);
for
(
i
=
0
;
i
<
n
;
++
i
)
{
ir_node
*
pred
=
get_irn_n
(
phi
,
i
);
if
(
!
is_Pin
(
pred
))
return
phi
;
in
[
i
]
=
get_Pin_op
(
pred
);
}
/* Move the Pin nodes "behind" the Phi. */
block
=
get_irn_n
(
phi
,
-
1
);
new_phi
=
new_r_Phi
(
block
,
n
,
in
,
mode_M
);
return
new_r_Pin
(
block
,
new_phi
);
}
}
/* Move Confirms down through Phi nodes. */
if
(
mode_is_reference
(
mode
))
{
else
if
(
mode_is_reference
(
mode
))
{
n
=
get_irn_arity
(
phi
);
/* Beware of Phi0 */
...
...
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