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
This commit is contained in:
Zdenek Dvorak 2010-10-14 09:08:45 +02:00 committed by Andrey Belevantsev
parent 854edfcda4
commit d2e60b7bc2
2 changed files with 14 additions and 1 deletions

View file

@ -1,3 +1,7 @@
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>
* ira.c (setup_class_hard_regs): Fix typo in indexing

View file

@ -661,7 +661,7 @@ et_nca (struct et_node *n1, struct et_node *n2)
if (r)
r->parent = o1;
}
else
else if (r == o2 || (r && r->parent != NULL))
{
ret = o2->prev;
@ -669,6 +669,15 @@ et_nca (struct et_node *n1, struct et_node *n2)
if (l)
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)
{