Skip to content
  1. Jan 08, 2009
    • Ted Kremenek's avatar
      PTH: Hook up getSpelling() caching in PTHLexer. This results in a nice · d5e6e16d
      Ted Kremenek authored
      performance gain. Here's what we see for -Eonly on Cocoa.h (using PTH):
      
      - wall time decreases by 21% (26% speedup overall)
      - system time decreases by 35%
      - user time decreases by 6%
      
      These reductions are due to not paging source files just to get spellings for
      literals. The solution in place doesn't appear to be 100% yet, as we still see
      some of the pages for source files getting mapped in. Using -print-stats, we see
      that SourceManager maps in 7179K less bytes of source text (reduction of 75%).
      Will investigate why the remaining 25% are getting paged in.
      
      With these changes, here's how PTH compares to non-PTH on Cocoa.h:
        -Eonly: PTH takes 64% of the time as non-PTH (54% speedup)
        -fsyntax-only: PTH takes 89% of the time as non-PTH (11% speedup)
      
      llvm-svn: 61913
      d5e6e16d
    • Ted Kremenek's avatar
      PTH: · 884a5584
      Ted Kremenek authored
      - Added stub PTHLexer::getSpelling() that will be used for fetching cached
        spellings from the PTH file.  This doesn't do anything yet.
      - Added a hook in Preprocessor::getSpelling() to call PTHLexer::getSpelling()
        when using a PTHLexer.
      - Updated PTHLexer to read the offsets of spelling tables in the PTH file.
      
      llvm-svn: 61911
      884a5584
  2. Jan 06, 2009
  3. Jan 05, 2009
  4. Dec 25, 2008
  5. Dec 24, 2008
  6. Dec 23, 2008
    • Ted Kremenek's avatar
      Remove old PTH token-generation test harness. · b0051a99
      Ted Kremenek authored
      llvm-svn: 61382
      b0051a99
    • Ted Kremenek's avatar
      PTH: Remove some methods and simplify some conditions in PTHLexer::Lex(). No... · 78cc2473
      Ted Kremenek authored
      PTH: Remove some methods and simplify some conditions in PTHLexer::Lex().  No big functionality change.
      
      llvm-svn: 61381
      78cc2473
    • Ted Kremenek's avatar
      PTH: Use 3 bytes instead of 4 bytes to encode the persistent ID for a token. · a754c403
      Ted Kremenek authored
      - This reduces the PTH size for Cocoa.h by 7%.
      - The increases PTH -Eonly speed for Cocoa.h by 0.8%.
      
      llvm-svn: 61377
      a754c403
    • Ted Kremenek's avatar
      3f94706e
    • Ted Kremenek's avatar
      PTH: · 1bd0a550
      Ted Kremenek authored
      - Encode the token length with 2 bytes instead of 4.
      - This reduces the size of the .pth file for Cocoa.h by 12%.
      - This speeds up PTH time (-Eonly) on Cocoa.h by 1.6%.
      
      llvm-svn: 61364
      1bd0a550
    • Ted Kremenek's avatar
      PTH: · 66076a96
      Ted Kremenek authored
      - In PTHLexer::Lex read all of the token data from PTH file before
        constructing the token.  The idea is to enhance locality.
      - Do not use Read8/Read32 in PTHLexer::Lex.  Inline these operations manually.
      - Change PTHManager::ReadIdentifierInfo() to PTHManager::GetIdentifierInfo().
        They are functionally the same except that PTHLexer::Lex() reads the
        persistent id.
      
      These changes result in a 3.3% speedup for PTH on Cocoa.h (-Eonly).
      
      llvm-svn: 61363
      66076a96
    • Ted Kremenek's avatar
      PTH: · 1b18ad24
      Ted Kremenek authored
      - Embed 'eom' tokens in PTH file.
      - Use embedded 'eom' tokens to not lazily generate them in the PTHLexer.
        This means that PTHLexer can always advance to the next token after
        reading a token (instead of buffering tokens using a copy).
      - Moved logic of 'ReadToken' into Lex.  GetToken & ReadToken no longer exist.
      - These changes result in a 3.3% speedup (-Eonly) on Cocoa.h.
      - The code is a little gross.  Many cleanups are possible and should be done.
      
      llvm-svn: 61360
      1b18ad24
  7. Dec 18, 2008
  8. Dec 17, 2008
  9. Dec 15, 2008
  10. Dec 13, 2008
  11. Dec 12, 2008
  12. Dec 11, 2008
    • Ted Kremenek's avatar
      PTHLexer: Keep track of the location of the last '#' token and provide the... · ca153f73
      Ted Kremenek authored
      PTHLexer: Keep track of the location of the last '#' token and provide the means to jump ahead in the token stream.
      
      llvm-svn: 60905
      ca153f73
    • Ted Kremenek's avatar
      Remove unused ivar CurTokenIdx. · 67ab296d
      Ted Kremenek authored
      llvm-svn: 60896
      67ab296d
    • Ted Kremenek's avatar
      PreprocessorLexer (and subclasses): · 8e1f05fc
      Ted Kremenek authored
      - Added virtual method 'getSourceLocation()' (no arguments) that gets the location of the next "observable" location (e.g., next character, next token).
      PPLexerChange.cpp:
      - Implemented FIXME by using PreprocessorLexer::getSourceLocation() to get the location in the file we are returning to after lexing a #included file.  This appears to be slightly faster than having the branch (i.e., 'if(CurLexer)').  It's also not a really hot part of the Preprocessor.
      
      llvm-svn: 60860
      8e1f05fc
  13. Dec 10, 2008
  14. Dec 04, 2008
  15. Dec 03, 2008
    • Ted Kremenek's avatar
      PTH: · 73a4d287
      Ted Kremenek authored
      Use an array instead of a DenseMap to cache persistent IDs -> IdentifierInfo*.  This leads to a 4% speedup at -fsyntax-only using PTH.
      
      llvm-svn: 60452
      73a4d287
    • Ted Kremenek's avatar
      - Remove PTHManager.cpp. Move all of its functions to PTHLexer.cpp since some... · 33eeabda
      Ted Kremenek authored
      - Remove PTHManager.cpp.  Move all of its functions to PTHLexer.cpp since some of the internal methods are used by PTHLexer (their implementations are intertwined.)  This enables some important inlining opportunities at -O3.
      
      - Don't construct an std::vector<Token> prior to feeding PTH tokens to the Preprocessor.  Stream them off the PTH file directly.
      
      llvm-svn: 60447
      33eeabda
  16. Dec 02, 2008
  17. Dec 01, 2008
  18. Nov 27, 2008
Loading