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
7bf9fdac
Commit
7bf9fdac
authored
Dec 14, 2007
by
Michael Beck
Browse files
restored old behavior of dump_ir_*_sched() functions: Can be called without schedule info available
[r16981]
parent
8593cd34
Changes
4
Hide whitespace changes
Inline
Side-by-side
ir/be/besched.c
View file @
7bf9fdac
...
...
@@ -47,6 +47,7 @@
#include
"beutil.h"
#include
"belistsched.h"
FIRM_IMPL1
(
have_sched_info
,
int
,
const
ir_graph
*
)
FIRM_IMPL1
(
sched_get_time_step
,
int
,
const
ir_node
*
)
FIRM_IMPL1
(
sched_has_next
,
int
,
const
ir_node
*
)
FIRM_IMPL1
(
sched_has_prev
,
int
,
const
ir_node
*
)
...
...
ir/be/besched.h
View file @
7bf9fdac
...
...
@@ -39,6 +39,7 @@ void be_sched_dump(FILE *f, ir_graph *irg);
* unique to that block. a node schedule before another node has a lower
* timestep than this node.
*/
int
have_sched_info
(
const
ir_graph
*
irg
);
int
sched_get_time_step
(
const
ir_node
*
irn
);
int
sched_has_next
(
const
ir_node
*
irn
);
int
sched_has_prev
(
const
ir_node
*
irn
);
...
...
ir/be/besched_t.h
View file @
7bf9fdac
...
...
@@ -58,6 +58,16 @@ typedef struct _sched_info_t {
#define get_irn_sched_info(irn) ((sched_info_t *) get_or_set_irn_phase_info(skip_Proj_const(irn), PHASE_BE_SCHED))
#define get_sched_info_irn(irg, sched_info) get_idx_irn((irg), (sched_info)->idx)
/**
* Returns non-zero if schedule information is available
* for a given graph.
* @param irg The graph.
*/
static
INLINE
int
_have_sched_info
(
const
ir_graph
*
irg
)
{
return
get_irg_phase
(
irg
,
PHASE_BE_SCHED
)
!=
NULL
;
}
/**
* Check, if the node is scheduled.
* @param irn The node.
...
...
@@ -65,7 +75,7 @@ typedef struct _sched_info_t {
*/
static
INLINE
int
_sched_is_scheduled
(
const
ir_node
*
irn
)
{
return
get_irn_sched_info
(
irn
)
->
scheduled
;
return
get_irn_sched_info
(
irn
)
->
scheduled
;
}
/**
...
...
@@ -338,6 +348,7 @@ int sched_skip_phi_predicator(const ir_node *irn, void *data);
*/
ir_node
*
sched_skip
(
ir_node
*
from
,
int
forward
,
sched_predicator_t
*
predicator
,
void
*
data
);
#define have_sched_info(irg) _have_sched_info(irg)
#define sched_get_time_step(irn) _sched_get_time_step(irn)
#define sched_has_next(irn) _sched_has_next(irn)
#define sched_has_prev(irn) _sched_has_prev(irn)
...
...
ir/be/beutil.c
View file @
7bf9fdac
...
...
@@ -145,7 +145,8 @@ void dump_ir_block_graph_sched(ir_graph *irg, const char *suffix) {
DUMP_NODE_EDGE_FUNC
old
=
get_dump_node_edge_hook
();
dump_consts_local
(
0
);
set_dump_node_edge_hook
(
sched_edge_hook
);
if
(
have_sched_info
(
irg
))
set_dump_node_edge_hook
(
sched_edge_hook
);
dump_ir_block_graph
(
irg
,
suffix
);
set_dump_node_edge_hook
(
old
);
}
...
...
@@ -154,7 +155,8 @@ void dump_ir_extblock_graph_sched(ir_graph *irg, const char *suffix) {
DUMP_NODE_EDGE_FUNC
old
=
get_dump_node_edge_hook
();
dump_consts_local
(
0
);
set_dump_node_edge_hook
(
sched_edge_hook
);
if
(
have_sched_info
(
irg
))
set_dump_node_edge_hook
(
sched_edge_hook
);
dump_ir_extblock_graph
(
irg
,
suffix
);
set_dump_node_edge_hook
(
old
);
}
...
...
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