aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/microsoft-abi-array-cookies.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2013-02-27 00:00:26 +0000
committerTed Kremenek <kremenek@apple.com>2013-02-27 00:00:26 +0000
commit2564f811ba107cb314a594d730aa3357b6181b62 (patch)
treee82cc70e40dcf889803e8139973354ffee87b637 /test/CodeGenCXX/microsoft-abi-array-cookies.cpp
parentb58f810669d9c17bcc025b7560de01d162856f34 (diff)
Refine SourceManager's isBeforeInTranslationUnit() cache to have more entries.
isBeforeInTranslationUnit() uses a cache to reduce the expensive work to compute a common ancestor for two FileIDs. This work is very expensive, so even caching the latest used FileIDs was a big win. A closer analysis of the cache before, however, shows that the cache access pattern would oscillate between a working set of FileIDs, and thus caching more pairs would be profitable. This patch adds a side table for extending caching. This side table is bounded in size (experimentally determined in this case from a simple Objective-C project), and when the table gets too large we fall back to the single entry caching before as before. On Sketch (a small example Objective-C project), this optimization reduces -fsyntax-only time on SKTGraphicView.m by 5%. This is for a project that is already using PCH. Fixes <rdar://problem/13299847> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176142 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/microsoft-abi-array-cookies.cpp')
0 files changed, 0 insertions, 0 deletions