hanchenye-llvm-project/clang/lib/Basic
Ted Kremenek 763ea559ac 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
2009-01-06 22:43:04 +00:00
..
CMakeLists.txt CMake: Builds and installs clang binary and libs (no docs yet). It 2008-10-26 00:56:18 +00:00
Diagnostic.cpp Fix order of evaluation. 2008-11-27 07:28:14 +00:00
FileManager.cpp Make a major restructuring of the clang tree: introduce a top-level 2008-03-15 23:59:48 +00:00
IdentifierTable.cpp Rename Selector::getName() to Selector::getAsString(), and add 2008-11-24 03:33:13 +00:00
LangOptions.cpp Add -fobjc-gc and -fobjc-gc-only options to the driver. 2008-04-29 04:37:03 +00:00
Makefile Make a major restructuring of the clang tree: introduce a top-level 2008-03-15 23:59:48 +00:00
SourceLocation.cpp Make some methods const, add some helpers to FullSourceLoc, 2008-09-29 21:46:13 +00:00
SourceManager.cpp SourceManager: Implement "lazy" creation of MemBuffers for source files. 2009-01-06 22:43:04 +00:00
TargetInfo.cpp More fallout from r58501: primary fix is some more corrections to make 2008-11-02 02:43:55 +00:00
Targets.cpp instead of forcing blocks on by default, make them default to off, but let 2008-12-04 23:20:07 +00:00
TokenKinds.cpp Make a major restructuring of the clang tree: introduce a top-level 2008-03-15 23:59:48 +00:00