summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.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
commit08037045f85bb6875a15b6db9a80b3c3476278a4 (patch)
treefa930707696ec7c98700728fa4b2a43851923fd7 /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
parent07c446baf48973767d7c629d37ee1b85395cc51c (diff)
downloadbcm5719-llvm-08037045f85bb6875a15b6db9a80b3c3476278a4.tar.gz
bcm5719-llvm-08037045f85bb6875a15b6db9a80b3c3476278a4.zip
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> llvm-svn: 176142
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud