summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-01-06 22:43:04 +0000
committerTed Kremenek <kremenek@apple.com>2009-01-06 22:43:04 +0000
commit763ea559acf408d6a6505aa17f80e972d2ef701b (patch)
treefc52cce0c4a7d7398ab168863f9ded09d25c1f2d /llvm/lib
parent63a55ab0796f4e9da9e9b4f94081473ea5e2a3d6 (diff)
downloadbcm5719-llvm-763ea559acf408d6a6505aa17f80e972d2ef701b.tar.gz
bcm5719-llvm-763ea559acf408d6a6505aa17f80e972d2ef701b.zip
SourceManager: Implement "lazy" creation of MemBuffers for source files.
- Big Idea: Source files are now mmaped when ContentCache::getBuffer() is first called. While this doesn't change the functionality when lexing regular source files, it can result in source files not being paged in when using PTH. - Performance change: - No observable difference (-fsyntax-only/-Eonly) on Cocoa.h when doing regular source lexing. - No observable time difference (-fsyntax-only/-Eonly) on Cocoa.h when using PTH. We do observe, however, a reduction of 279K in memory mapped source code (3% reduction). The majority of pages from Cocoa.h (and friends) are still being pulled in, however, because any literal will cause Preprocessor::getSpelling() to be called (causing the source for the file to get pulled in). The next possible optimization is to cache literal strings in the PTH file to avoid the need for the original header sources entirely. - Right now there is a preprocessor directive to toggle between "lazy" and "eager" creation of MemBuffers. This is not permanent, and is there in the short term to just test additional optimizations. llvm-svn: 61827
Diffstat (limited to 'llvm/lib')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud