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
45cfa914
Commit
45cfa914
authored
Dec 17, 2012
by
Christoph Mallon
Browse files
bechordal: Process Phis before live-in nodes again.
Add a comment, why this is an important property.
parent
0ac0b440
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/bechordal_common.c
View file @
45cfa914
...
...
@@ -87,9 +87,6 @@ void create_borders(ir_node *block, void *env_ptr)
* relevant for the interval borders.
*/
sched_foreach_reverse
(
block
,
irn
)
{
if
(
is_Phi
(
irn
))
break
;
DB
((
dbg
,
LEVEL_1
,
"
\t
insn: %+F
\n
"
,
irn
));
be_foreach_definition
(
irn
,
env
->
cls
,
def
,
req
,
...
...
@@ -101,23 +98,27 @@ void create_borders(ir_node *block, void *env_ptr)
border_def
(
def
,
step
,
1
);
);
/* Examine the uses. */
be_foreach_use
(
irn
,
env
->
cls
,
in_req_
,
op
,
op_req_
,
const
char
*
msg
=
"-"
;
/* If the node is no phi node we can examine the uses. */
if
(
!
is_Phi
(
irn
))
{
be_foreach_use
(
irn
,
env
->
cls
,
in_req_
,
op
,
op_req_
,
const
char
*
msg
=
"-"
;
if
(
ir_nodeset_insert
(
&
live
,
op
))
{
border_use
(
op
,
step
,
1
);
msg
=
"X"
;
}
if
(
ir_nodeset_insert
(
&
live
,
op
))
{
border_use
(
op
,
step
,
1
);
msg
=
"X"
;
}
DB
((
dbg
,
LEVEL_4
,
"
\t\t
%s pos: %d, use: %+F
\n
"
,
msg
,
i_
,
op
));
);
DB
((
dbg
,
LEVEL_4
,
"
\t\t
%s pos: %d, use: %+F
\n
"
,
msg
,
i_
,
op
));
);
}
++
step
;
}
/* Process live-ins last. In particular all Phis are handled before, so when
* iterating the borders the live-ins come before all Phis ("live-start"). */
foreach_ir_nodeset
(
&
live
,
irn
,
iter
)
{
assert
(
be_is_live_in
(
lv
,
block
,
irn
)
^
(
is_Phi
(
irn
)
&&
get_nodes_block
(
irn
)
==
block
)
);
border_def
(
irn
,
step
,
get_nodes_block
(
irn
)
==
block
);
assert
(
be_is_live_in
(
lv
,
block
,
irn
));
border_def
(
irn
,
step
,
0
);
}
ir_nodeset_destroy
(
&
live
);
...
...
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