[LCG] Re-implement the basic isParentOf, isAncestorOf, isChildOf, and
authorChandler Carruth <chandlerc@gmail.com>
Sat, 5 Aug 2017 06:24:09 +0000 (06:24 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 5 Aug 2017 06:24:09 +0000 (06:24 +0000)
commit38bd6b50ef500c2bf166593712443c609a3356ba
treef0591c7df6cad0da7f172adbe71bd655a8c99f6c
parentc718b8e7c35d0677a68ecdfd8d575b58205a970f
[LCG] Re-implement the basic isParentOf, isAncestorOf, isChildOf, and
isDescendantOf methods on RefSCCs in terms of the forward edges rather
than the parent sets.

This is technically slower, but probably not interestingly slower, and
all of these routines were already so expensive that they're guarded
behind both !NDEBUG and EXPENSIVE_CHECKS.

This removes another non-critical usage of parent sets.

I've also added some comments to try and help clarify to any potential
users the costs of these routines. They're mostly useful for debugging,
asserts, or other queries.

llvm-svn: 310170
llvm/include/llvm/Analysis/LazyCallGraph.h
llvm/lib/Analysis/LazyCallGraph.cpp