OSDN Git Service

[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)
commit8d16ccbe0f84bf6161be6fd3829f30784d995973
tree72c797613600e2f344587f7ef32354562c0c063f
parent95f263eb86dd50d6bbf0814f7d0fe99e246c4faf
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310170 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/LazyCallGraph.h
lib/Analysis/LazyCallGraph.cpp