forked from OSchip/llvm-project
[Dominators] Update DominatorTree compare in case roots are different
The compare function, unusually, returns false on same, true on different. This fixes the conditions for different roots. Reviewed as a part of D41298. llvm-svn: 325517
This commit is contained in:
parent
a7c457d288
commit
bc35f069f4
|
@ -319,10 +319,10 @@ protected:
|
||||||
if (Parent != Other.Parent) return true;
|
if (Parent != Other.Parent) return true;
|
||||||
|
|
||||||
if (Roots.size() != Other.Roots.size())
|
if (Roots.size() != Other.Roots.size())
|
||||||
return false;
|
return true;
|
||||||
|
|
||||||
if (!std::is_permutation(Roots.begin(), Roots.end(), Other.Roots.begin()))
|
if (!std::is_permutation(Roots.begin(), Roots.end(), Other.Roots.begin()))
|
||||||
return false;
|
return true;
|
||||||
|
|
||||||
const DomTreeNodeMapType &OtherDomTreeNodes = Other.DomTreeNodes;
|
const DomTreeNodeMapType &OtherDomTreeNodes = Other.DomTreeNodes;
|
||||||
if (DomTreeNodes.size() != OtherDomTreeNodes.size())
|
if (DomTreeNodes.size() != OtherDomTreeNodes.size())
|
||||||
|
|
Loading…
Reference in New Issue