Commit 20a0283f authored by Christoph Mallon's avatar Christoph Mallon
Browse files

belive: Change all users of _value_strictly_dominates() to _value_strictly_dominates_intrablock().

All users check, that the blocks are equal, beforehand.
parent 81143885
......@@ -71,32 +71,6 @@ static inline int _value_dominates(const ir_node *a, const ir_node *b)
return _value_dominates_intrablock(a, b);
}
/**
* Check, if one value dominates the other.
* The dominance is strict here.
* @param a The first node.
* @param b The second node.
* @return 1 if a dominates b, 0 else.
*/
static inline int _value_strictly_dominates(const ir_node *a, const ir_node *b)
{
const ir_node *block_a = get_block_const(a);
const ir_node *block_b = get_block_const(b);
/*
* a and b are not in the same block,
* so dominance is determined by the dominance of the blocks.
*/
if(block_a != block_b) {
return block_dominates(block_a, block_b);
}
/*
* Dominance is determined by the time steps of the schedule.
*/
return _value_strictly_dominates_intrablock(a, b);
}
/**
* Check, if two values interfere.
* @param lv Liveness information
......@@ -147,7 +121,7 @@ static inline int be_values_interfere(const be_lv_t *lv, const ir_node *a, const
*/
foreach_out_edge(a, edge) {
const ir_node *user = get_edge_src_irn(edge);
if(get_nodes_block(user) == bb && !is_Phi(user) && _value_strictly_dominates(b, user)) {
if (get_nodes_block(user) == bb && !is_Phi(user) && _value_strictly_dominates_intrablock(b, user)) {
res = 1;
goto end;
}
......
......@@ -262,12 +262,12 @@ static int my_values_interfere2(ir_graph *irg, const ir_node *a,
const ir_node *user2 = get_edge_src_irn(edge2);
assert(!is_Sync(user2));
if (get_nodes_block(user2) == bb && !is_Phi(user2) &&
_value_strictly_dominates(b, user2))
_value_strictly_dominates_intrablock(b, user2))
return 1;
}
} else {
if (get_nodes_block(user) == bb && !is_Phi(user) &&
_value_strictly_dominates(b, user))
_value_strictly_dominates_intrablock(b, user))
return 1;
}
}
......
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