Commit ac4539bc authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Skip projs before getting backend flags.

[r26336]
parent e86f1bc3
......@@ -203,7 +203,7 @@ static void prepare_constr_insn(be_pre_spill_env_t *env, ir_node *node)
req = arch_get_register_req(node, i);
if (req->cls != cls)
continue;
if (! (req->type & arch_register_req_type_limited))
if (!(req->type & arch_register_req_type_limited))
continue;
in = get_irn_n(node, i);
......
......@@ -291,7 +291,7 @@ static inline unsigned get_distance(ir_node *from, unsigned from_step,
return USES_INFINITY;
/* We have to keep nonspillable nodes in the workingset */
if (arch_irn_get_flags(def) & arch_irn_flags_dont_spill)
if (arch_irn_get_flags(skip_Proj_const(def)) & arch_irn_flags_dont_spill)
return 0;
/* give some bonus to rematerialisable nodes */
......@@ -485,7 +485,7 @@ static loc_t to_take_or_not_to_take(ir_node* first, ir_node *node,
}
/* We have to keep nonspillable nodes in the workingset */
if (arch_irn_get_flags(node) & arch_irn_flags_dont_spill) {
if (arch_irn_get_flags(skip_Proj_const(node)) & arch_irn_flags_dont_spill) {
loc.time = 0;
DB((dbg, DBG_START, " %+F taken (dontspill node)\n", node, loc.time));
return loc;
......
......@@ -197,7 +197,7 @@ void be_add_spill(spill_env_t *env, ir_node *to_spill, ir_node *after)
spill_t *s;
spill_t *last;
assert(!arch_irn_is(to_spill, dont_spill));
assert(!arch_irn_is(skip_Proj_const(to_spill), dont_spill));
DB((dbg, LEVEL_1, "Add spill of %+F after %+F\n", to_spill, after));
/* Just for safety make sure that we do not insert the spill in front of a phi */
......@@ -263,7 +263,7 @@ void be_add_reload2(spill_env_t *env, ir_node *to_spill, ir_node *before,
spill_info_t *info;
reloader_t *rel;
assert(!arch_irn_is(to_spill, dont_spill));
assert(!arch_irn_is(skip_Proj_const(to_spill), dont_spill));
info = get_spillinfo(env, to_spill);
......@@ -585,11 +585,7 @@ static int is_value_available(spill_env_t *env, const ir_node *arg,
static int is_remat_node(const ir_node *node)
{
assert(!be_is_Spill(node));
if (arch_irn_is(node, rematerializable))
return 1;
return 0;
return arch_irn_is(skip_Proj_const(node), rematerializable);
}
/**
......@@ -624,7 +620,7 @@ static int check_remat_conditions_costs(spill_env_t *env,
* (would be better to test wether the flags are actually live at point
* reloader...)
*/
if (arch_irn_is(spilled, modify_flags)) {
if (arch_irn_is(skip_Proj_const(spilled), modify_flags)) {
return REMAT_COST_INFINITE;
}
......@@ -783,7 +779,7 @@ static void determine_spill_costs(spill_env_t *env, spill_info_t *spillinfo)
if(spillinfo->spill_costs >= 0)
return;
assert(!arch_irn_is(to_spill, dont_spill));
assert(!arch_irn_is(skip_Proj_const(to_spill), dont_spill));
assert(!be_is_Reload(to_spill));
/* some backends have virtual noreg/unknown nodes that are not scheduled
......
Markdown is supported
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