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
ac27e70e
Commit
ac27e70e
authored
Aug 08, 2006
by
Matthias Braun
Browse files
- Schedule Verifier checks for nodes that should be scheduled
parent
f3b87a11
Changes
2
Show whitespace changes
Inline
Side-by-side
ir/be/bechordal_main.c
View file @
ac27e70e
...
...
@@ -609,6 +609,18 @@ static be_ra_timer_t *be_ra_chordal_main(const be_irg_t *bi)
free_execfreq
(
chordal_env
.
exec_freq
);
BE_TIMER_POP
(
ra_timer
.
t_epilog
);
BE_TIMER_PUSH
(
ra_timer
.
t_verify
);
/* verify spillslots */
if
(
options
.
vrfy_option
==
BE_CH_VRFY_WARN
)
{
be_verify_schedule
(
irg
);
}
else
if
(
options
.
vrfy_option
==
BE_CH_VRFY_ASSERT
)
{
assert
(
be_verify_schedule
(
irg
)
&&
"Schedule verification failed"
);
}
BE_TIMER_POP
(
ra_timer
.
t_verify
);
BE_TIMER_POP
(
ra_timer
.
t_other
);
#undef BE_TIMER_PUSH
...
...
ir/be/beverify.c
View file @
ac27e70e
...
...
@@ -184,12 +184,41 @@ static void verify_schedule_walker(ir_node *block, void *data)
/* check that all delay branches are filled (at least with NOPs) */
if
(
cfchange_found
&&
delay_branches
!=
0
)
{
ir_fprintf
(
stderr
,
"Not all delay slots filled after jump (%d/%d) in block %+F (%s)
\n
"
,
ir_fprintf
(
stderr
,
"
Verify warning:
Not all delay slots filled after jump (%d/%d) in block %+F (%s)
\n
"
,
block
,
get_irg_dump_name
(
env
->
irg
));
env
->
problem_found
=
1
;
}
}
static
int
should_be_scheduled
(
ir_node
*
node
)
{
if
(
get_irn_mode
(
node
)
==
mode_M
)
{
if
(
is_Phi
(
node
)
||
is_Proj
(
node
)
||
is_Sync
(
node
))
return
0
;
}
if
(
is_Proj
(
node
)
&&
get_irn_mode
(
node
)
==
mode_X
)
return
0
;
if
(
get_irn_opcode
(
node
)
==
iro_End
||
get_irn_opcode
(
node
)
==
iro_NoMem
)
return
0
;
return
1
;
}
static
void
check_schedule
(
ir_node
*
node
,
void
*
data
)
{
be_verify_schedule_env_t
*
env
=
data
;
int
should_be
;
if
(
is_Block
(
node
))
return
;
should_be
=
should_be_scheduled
(
node
);
if
(
should_be
?
!
sched_is_scheduled
(
node
)
:
sched_is_scheduled
(
node
))
{
ir_fprintf
(
stderr
,
"Verify warning: Node %+F in block %+F(%s) should%s be scheduled
\n
"
,
node
,
get_nodes_block
(
node
),
get_irg_dump_name
(
env
->
irg
),
should_be
?
""
:
"not "
);
env
->
problem_found
=
1
;
}
}
/**
* Start a walk over the irg and check schedule.
*/
...
...
@@ -201,6 +230,8 @@ int be_verify_schedule(ir_graph *irg)
env
.
irg
=
irg
;
irg_block_walk_graph
(
irg
,
verify_schedule_walker
,
NULL
,
&
env
);
// check if all nodes are scheduled
irg_walk_graph
(
irg
,
check_schedule
,
NULL
,
&
env
);
return
!
env
.
problem_found
;
}
...
...
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