Move the functionality to mark all vtables of key functions as used within
commita1e6d56ca5f303c794eac752f5e72b9403ce33df
authorChandler Carruth <chandlerc@gmail.com>
Sun, 12 Dec 2010 21:36:11 +0000 (12 21:36 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 12 Dec 2010 21:36:11 +0000 (12 21:36 +0000)
tree401505c143fb04a315e4d03bd7dc237ae393410c
parent89da7f2f83be2d11f1373922b37c0981b1e82e3c
Move the functionality to mark all vtables of key functions as used within
a translation unit to the ActOnEndOfTranslationUnit function instead of doing
it at the start of DefineUsedVTables. The latter is now called *recursively*
during template instantiation, which causes an absolutely insane number of
walks of every record decl in the translation unit.

After this patch, an extremely template instantiation heavy test case's compile
time drops by 10x, and we see between 15% and 20% improvement in average
compile times across a project. This is just recovering a regression, it
doesn't make anything faster than it was several weeks ago.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121644 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/Sema.cpp
lib/Sema/SemaDeclCXX.cpp