Commit d2e60b7b by Zdenek Dvorak Committed by Andrey Belevantsev

et-forest.c (et_nca): Return NULL immediately when the dominance forest has disjoint components.

2010-10-14  Zdenek Dvorak  <rakdver@kam.uniff.cz>
        * et-forest.c (et_nca): Return NULL immediately when
        the dominance forest has disjoint components.

From-SVN: r165451
parent 854edfcd
2010-10-14 Zdenek Dvorak <rakdver@kam.uniff.cz>
* et-forest.c (et_nca): Return NULL immediately when
the dominance forest has disjoint components.
2010-10-13 Vladimir Makarov <vmakarov@redhat.com> 2010-10-13 Vladimir Makarov <vmakarov@redhat.com>
* ira.c (setup_class_hard_regs): Fix typo in indexing * ira.c (setup_class_hard_regs): Fix typo in indexing
...@@ -661,7 +661,7 @@ et_nca (struct et_node *n1, struct et_node *n2) ...@@ -661,7 +661,7 @@ et_nca (struct et_node *n1, struct et_node *n2)
if (r) if (r)
r->parent = o1; r->parent = o1;
} }
else else if (r == o2 || (r && r->parent != NULL))
{ {
ret = o2->prev; ret = o2->prev;
...@@ -669,6 +669,15 @@ et_nca (struct et_node *n1, struct et_node *n2) ...@@ -669,6 +669,15 @@ et_nca (struct et_node *n1, struct et_node *n2)
if (l) if (l)
l->parent = o1; l->parent = o1;
} }
else
{
/* O1 and O2 are in different components of the forest. */
if (l)
l->parent = o1;
if (r)
r->parent = o1;
return NULL;
}
if (0 < o2->depth) if (0 < o2->depth)
{ {
......
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