llvm-project/clang/lib
Rafael Espindola 9551d3bad9 Check the linkage cache at every recursive step.
Before this patch the linkage cache was only used by the entry level function
(getLinkage). The function that does the actual computation (getLVForDecl),
never looked at it.

This means that we would not reuse an entry in the cache when getLVForDecl did
a recursive call. This patch fixes that by adding another computation enum
value for when we don't care about the linkage at all and having getLVForDecl
check the cache in that case.

When running "clang -cc1" over SemaExpr.ii this brings the number of linkage
computations from 93749 to 58426. When running "clang -cc1 -emit-llvm -O3" it
goes from 198708 to 161444.

For SemaExpr.ii at least linkage computation is a small enough percentage of
the work that the time difference was in the noise.

When asserts are enabled this patch also causes clang to check the linkage
cache even on recursive calls.

llvm-svn: 182799
2013-05-28 19:43:11 +00:00
..
ARCMigrate Cleanup handling of UniqueExternalLinkage. 2013-05-13 00:12:11 +00:00
AST Check the linkage cache at every recursive step. 2013-05-28 19:43:11 +00:00
ASTMatchers Add an overridable MatchCallback::onEndOfTranslationUnit() function. 2013-05-28 19:21:51 +00:00
Analysis Thread safety analysis: fix use after free bug reported by Evgeniy Stepanov. 2013-05-20 17:57:55 +00:00
Basic Make isBeforeInTranslationUnit consistent in the face of failures to get a valid FileID (V2). 2013-05-25 01:03:03 +00:00
CodeGen Build correct coercion types in SparcV9ABIInfo. 2013-05-28 04:57:37 +00:00
Driver Driver: implement --dyld-prefix option. 2013-05-27 21:40:20 +00:00
Edit [objcmt] Fix a mishandled conversion to objc directory literal. 2013-04-06 01:13:17 +00:00
Format Remove obsolete variable as discovered in post-commit review. 2013-05-28 19:11:43 +00:00
Frontend [modules] If we hit a failure while loading a PCH/module, abort parsing instead of trying to continue in an invalid state. 2013-05-24 05:44:08 +00:00
FrontendTool <rdar://problem/13509689> Introduce -module-file-info option that provides information about a particular module file. 2013-03-27 16:47:18 +00:00
Headers Add arm_neon.h to the builtin intrinsics module map. 2013-05-20 14:07:18 +00:00
Lex [Preprocessor] Prevent expansion of y in x ## y when x is empty 2013-05-25 01:35:18 +00:00
Parse [modules] If we hit a failure while loading a PCH/module, abort parsing instead of trying to continue in an invalid state. 2013-05-24 05:44:08 +00:00
Rewrite Use only explicit bool conversion operator 2013-05-15 07:37:26 +00:00
Sema Patch to issue error when target of MacOS and iOS 2013-05-28 17:37:39 +00:00
Serialization Fix linkage computation for derived types in inline functions. 2013-05-25 17:16:20 +00:00
StaticAnalyzer [analyzer] Use a more generic MemRegion.getAsOffset to evaluate bin operators on MemRegions 2013-05-28 17:31:43 +00:00
Tooling Let clang-format move the cursor appropriately. 2013-05-21 12:21:39 +00:00
CMakeLists.txt Initial version of formatting library. 2012-12-03 18:12:45 +00:00
Makefile Dont use/link ARCMT, StaticAnalyzer and Rewriter to clang when the user 2012-12-13 16:09:42 +00:00