Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
5b1f3d9c
Commit
5b1f3d9c
authored
Mar 16, 2016
by
Christoph Mallon
Browse files
beblocksched: Do not put the end block into the block schedule.
This way all the backends do not have to filter it by themselves.
parent
61566616
Changes
3
Hide whitespace changes
Inline
Side-by-side
ir/be/beblocksched.c
View file @
5b1f3d9c
...
...
@@ -179,6 +179,10 @@ static void collect_egde_frequency(ir_node *block, void *data)
{
blocksched_env_t
*
env
=
(
blocksched_env_t
*
)
data
;
/* Exclude the end block from the block schedule. */
if
(
block
==
get_irg_end_block
(
env
->
irg
))
return
;
edge_t
edge
;
memset
(
&
edge
,
0
,
sizeof
(
edge
));
...
...
@@ -189,10 +193,9 @@ static void collect_egde_frequency(ir_node *block, void *data)
ir_loop
*
loop
=
get_irn_loop
(
block
);
int
arity
=
get_Block_n_cfgpreds
(
block
);
if
(
arity
==
0
)
{
/* must be the start block (or end-block for endless loops),
* everything else is dead code and should be removed by now */
assert
(
block
==
get_irg_start_block
(
env
->
irg
)
||
block
==
get_irg_end_block
(
env
->
irg
));
/* must be the start block, everything else is dead code and should be
* removed by now */
assert
(
block
==
get_irg_start_block
(
env
->
irg
));
/* nothing to do here */
return
;
}
else
if
(
arity
==
1
)
{
...
...
@@ -493,6 +496,8 @@ static blocksched_entry_t *finish_block_schedule(blocksched_env_t *env)
ir_reserve_resources
(
irg
,
IR_RESOURCE_IRN_VISITED
);
inc_irg_visited
(
irg
);
/* Exclude the end block from the block schedule. */
mark_irn_visited
(
get_irg_end_block
(
irg
));
env
->
worklist
=
new_pdeq
();
ir_node
*
const
startblock
=
get_irg_start_block
(
irg
);
...
...
ir/be/ia32/ia32_emitter.c
View file @
5b1f3d9c
...
...
@@ -1484,10 +1484,6 @@ bool ia32_should_align_block(ir_node const *const block)
*/
static
void
ia32_emit_block_header
(
ir_node
*
block
)
{
ir_graph
*
const
irg
=
get_irn_irg
(
block
);
if
(
block
==
get_irg_end_block
(
irg
))
return
;
if
(
ia32_cg_config
.
label_alignment
>
0
)
{
/* align the current block if:
* a) if should be aligned due to its execution frequency
...
...
ir/be/sparc/sparc_emitter.c
View file @
5b1f3d9c
...
...
@@ -1453,10 +1453,7 @@ void sparc_emit_function(ir_graph *irg)
pick_delay_slots
(
n_blocks
,
block_schedule
);
for
(
size_t
i
=
0
;
i
<
n_blocks
;
++
i
)
{
ir_node
*
block
=
block_schedule
[
i
];
if
(
block
==
get_irg_end_block
(
irg
))
continue
;
sparc_emit_block
(
block
);
sparc_emit_block
(
block_schedule
[
i
]);
}
ir_free_resources
(
irg
,
IR_RESOURCE_IRN_LINK
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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