Commit 4ad688d6 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

be: Use arch_is_irn_not_scheduled().

parent 553e7e5f
...@@ -65,7 +65,7 @@ static void add_to_sched(ir_node *node); ...@@ -65,7 +65,7 @@ static void add_to_sched(ir_node *node);
*/ */
static void node_ready(ir_node *node) static void node_ready(ir_node *node)
{ {
if (is_Proj(node) || arch_irn_is(node, not_scheduled)) { if (arch_is_irn_not_scheduled(node)) {
/* not_scheduled nodes are already available */ /* not_scheduled nodes are already available */
DB((dbg, LEVEL_3, "\tmaking available: %+F\n", node)); DB((dbg, LEVEL_3, "\tmaking available: %+F\n", node));
make_available(node); make_available(node);
......
...@@ -49,11 +49,6 @@ static void set_irn_flag_and_cost(ir_node *node, flag_and_cost *fc) ...@@ -49,11 +49,6 @@ static void set_irn_flag_and_cost(ir_node *node, flag_and_cost *fc)
set_irn_link(node, fc); set_irn_link(node, fc);
} }
static bool must_be_scheduled(const ir_node *const irn)
{
return !is_Proj(irn) && !arch_irn_is(irn, not_scheduled);
}
static ir_node *normal_select(ir_nodeset_t *ready_set) static ir_node *normal_select(ir_nodeset_t *ready_set)
{ {
for (ir_node *irn = curr_list, *last = NULL, *next; irn != NULL; for (ir_node *irn = curr_list, *last = NULL, *next; irn != NULL;
...@@ -167,7 +162,7 @@ static void normal_cost_walker(ir_node *irn, void *data) ...@@ -167,7 +162,7 @@ static void normal_cost_walker(ir_node *irn, void *data)
set_irn_link(irn, roots); set_irn_link(irn, roots);
return; return;
} }
if (!must_be_scheduled(irn)) if (arch_is_irn_not_scheduled(irn))
return; return;
normal_tree_cost(irn); normal_tree_cost(irn);
} }
...@@ -175,7 +170,7 @@ static void normal_cost_walker(ir_node *irn, void *data) ...@@ -175,7 +170,7 @@ static void normal_cost_walker(ir_node *irn, void *data)
static void collect_roots(ir_node *irn, void *env) static void collect_roots(ir_node *irn, void *env)
{ {
(void)env; (void)env;
if (!must_be_scheduled(irn)) if (arch_is_irn_not_scheduled(irn))
return; return;
bool is_root = be_is_Keep(irn) || !get_irn_flag_and_cost(irn)->no_root; bool is_root = be_is_Keep(irn) || !get_irn_flag_and_cost(irn)->no_root;
...@@ -270,7 +265,7 @@ static void normal_sched_block(ir_node *block, void *env) ...@@ -270,7 +265,7 @@ static void normal_sched_block(ir_node *block, void *env)
ir_node **sched = NEW_ARR_F(ir_node*, 0); ir_node **sched = NEW_ARR_F(ir_node*, 0);
for (int i = 0; i < root_count; ++i) { for (int i = 0; i < root_count; ++i) {
ir_node *irn = root_costs[i].irn; ir_node *irn = root_costs[i].irn;
assert(must_be_scheduled(irn)); assert(!arch_is_irn_not_scheduled(irn));
sched = sched_node(sched, irn); sched = sched_node(sched, irn);
} }
set_irn_link(block, sched); set_irn_link(block, sched);
......
...@@ -248,8 +248,8 @@ static void verify_schedule_walker(ir_node *block, void *data) ...@@ -248,8 +248,8 @@ static void verify_schedule_walker(ir_node *block, void *data)
static void check_schedule(ir_node *node, void *data) static void check_schedule(ir_node *node, void *data)
{ {
be_verify_schedule_env_t *env = (be_verify_schedule_env_t*)data; be_verify_schedule_env_t *env = (be_verify_schedule_env_t*)data;
bool should_be = !is_Proj(node) && !(arch_get_irn_flags(node) & arch_irn_flag_not_scheduled); bool const should_be = !arch_is_irn_not_scheduled(node);
bool scheduled = bitset_is_set(env->scheduled, get_irn_idx(node)); bool const scheduled = bitset_is_set(env->scheduled, get_irn_idx(node));
if (should_be != scheduled) { if (should_be != scheduled) {
ir_fprintf(stderr, "Verify warning: Node %+F in block %+F(%s) should%s be scheduled\n", ir_fprintf(stderr, "Verify warning: Node %+F in block %+F(%s) should%s be scheduled\n",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment