]> granicus.if.org Git - llvm/commit
[LCG] Special case when removing a ref edge from a RefSCC leaves
authorChandler Carruth <chandlerc@gmail.com>
Wed, 9 Aug 2017 09:14:34 +0000 (09:14 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 9 Aug 2017 09:14:34 +0000 (09:14 +0000)
commit5428aff18cc9d9ac23beafa88ae848198469c0d1
tree7f9fd927f8a0f33e8d000ced4f1aa70719539fe5
parentaffd12878e9bcabdc0a6354763ff6eb4b138d7fb
[LCG] Special case when removing a ref edge from a RefSCC leaves
that RefSCC still connected.

This is common and can be handled much more efficiently. As soon as we
know we've covered every node in the RefSCC with the DFS, we can simply
reset our state and return. This avoids numerous data structure updates
and other complexity.

On top of other changes, this appears to get new PM back to parity with
the old PM for a large protocol buffer message source code. The dense
map updates are very hot in this function.

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