[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)
commit9c3deaa6533ddbf8fa5f44c33202dbb9fe368516
treea35be6a5aeb7e3be914250d4264f2657ee7e2c17
parent23c2f44cc7b8a2fd24eb951616b9c4d2c6459d28
[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.

llvm-svn: 310451
llvm/lib/Analysis/LazyCallGraph.cpp