Commit 59edc3a2 authored by Michael Beck's avatar Michael Beck
Browse files

block_dominates() can now handle Bad nodes

[r5301]
parent c19953ed
......@@ -99,11 +99,13 @@ int block_dominates(const ir_node *a, const ir_node *b)
{
const dom_info *ai, *bi;
assert(is_Block(a) && is_Block(b));
ai = get_dom_info(a);
bi = get_dom_info(b);
return bi->tree_pre_num - ai->tree_pre_num
<= ai->max_subtree_pre_num - ai->tree_pre_num;
if (is_Block(a) && is_Block(b)) {
ai = get_dom_info(a);
bi = get_dom_info(b);
return bi->tree_pre_num - ai->tree_pre_num
<= ai->max_subtree_pre_num - ai->tree_pre_num;
}
return 0;
}
ir_node *get_Block_dominated_first(const ir_node *bl)
......
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