projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added a ;
[libfirm]
/
ir
/
be
/
belistsched.c
diff --git
a/ir/be/belistsched.c
b/ir/be/belistsched.c
index
3aedf5b
..
20642a7
100644
(file)
--- a/
ir/be/belistsched.c
+++ b/
ir/be/belistsched.c
@@
-138,12
+138,12
@@
static void *trivial_init_block(void *graph_env, ir_node *bl)
static INLINE int must_appear_in_schedule(const list_sched_selector_t *sel, void *block_env, const ir_node *irn)
{
static INLINE int must_appear_in_schedule(const list_sched_selector_t *sel, void *block_env, const ir_node *irn)
{
- int res =
0
;
+ int res =
-1
;
if(sel->to_appear_in_schedule)
res = sel->to_appear_in_schedule(block_env, irn);
if(sel->to_appear_in_schedule)
res = sel->to_appear_in_schedule(block_env, irn);
- return res
|| to_appear_in_schedule(irn) || be_is_Keep(irn) || be_is_RegParams(irn
);
+ return res
>= 0 ? res : (to_appear_in_schedule(irn) || be_is_Keep(irn) || be_is_RegParams(irn)
);
}
static const list_sched_selector_t trivial_selector_struct = {
}
static const list_sched_selector_t trivial_selector_struct = {
@@
-712,6
+712,8
@@
static int is_root(ir_node *root, ir_node *block) {
static char _mark;
#define MARK &_mark
static char _mark;
#define MARK &_mark
+static firm_dbg_module_t *xxxdbg;
+
/**
* descent into a dag and create a pre-order list.
*/
/**
* descent into a dag and create a pre-order list.
*/
@@
-723,6
+725,7
@@
static void descent(ir_node *root, ir_node *block, ir_node **list) {
for (i = get_irn_arity(root) - 1; i >= 0; --i) {
ir_node *pred = get_irn_n(root, i);
for (i = get_irn_arity(root) - 1; i >= 0; --i) {
ir_node *pred = get_irn_n(root, i);
+ DBG((xxxdbg, LEVEL_3, " node %+F\n", pred));
/* Blocks may happen as predecessors of End nodes */
if (is_Block(pred))
continue;
/* Blocks may happen as predecessors of End nodes */
if (is_Block(pred))
continue;
@@
-735,6
+738,8
@@
static void descent(ir_node *root, ir_node *block, ir_node **list) {
if (get_nodes_block(pred) != block)
continue;
if (get_nodes_block(pred) != block)
continue;
+ set_irn_link(pred, NULL);
+
descent(pred, block, list);
}
}
descent(pred, block, list);
}
}
@@
-779,6
+784,7
@@
static void list_sched_block(ir_node *block, void *env_ptr)
be.selector = selector;
be.sched_env = env;
FIRM_DBG_REGISTER(be.dbg, "firm.be.sched");
be.selector = selector;
be.sched_env = env;
FIRM_DBG_REGISTER(be.dbg, "firm.be.sched");
+ FIRM_DBG_REGISTER(xxxdbg, "firm.be.sched");
// firm_dbg_set_mask(be.dbg, SET_LEVEL_3);
// firm_dbg_set_mask(be.dbg, SET_LEVEL_3);
@@
-804,6
+810,7
@@
static void list_sched_block(ir_node *block, void *env_ptr)
preord = NULL;
for (curr = root; curr; curr = irn) {
irn = get_irn_link(curr);
preord = NULL;
for (curr = root; curr; curr = irn) {
irn = get_irn_link(curr);
+ DBG((be.dbg, LEVEL_2, " DAG root %+F\n", curr));
descent(curr, block, &preord);
}
root = preord;
descent(curr, block, &preord);
}
root = preord;