Граф коммитов

15 Коммитов

Автор SHA1 Сообщение Дата
Chris Lattner 1b230149be use getBuffer() to fix compile error. Ted, please review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61786 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-06 04:47:20 +00:00
Ted Kremenek 18d9afb815 PTH: Use 3 bytes instead of 4 bytes to encode the persistent ID for a token.
- This reduces the PTH size for Cocoa.h by 7%.
- The increases PTH -Eonly speed for Cocoa.h by 0.8%.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61377 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-23 18:41:34 +00:00
Ted Kremenek 8f174e173c PTH:
- 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%.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61364 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-23 02:52:12 +00:00
Ted Kremenek e5680f3cd6 PTH:
- 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61360 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-23 01:30:52 +00:00
Ted Kremenek dad7b34a33 Enhance PTH preprocessor-condition-block side table to track #elseinformation as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60955 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-12 18:31:09 +00:00
Ted Kremenek fb645b6547 PTH:
- Added a side-table per each token-cached file with the preprocessor conditional stack.  This tracks what #if's are matched with what #endifs and where their respective tokens are in the PTH file.  This will allow for quick skipping of excluded conditional branches in the Preprocessor.
- Performance testing shows the addition of this information (without actually utilizing it) leads to no performance regressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60911 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-11 23:36:38 +00:00
Ted Kremenek 8dffd9b988 Remove unneeded assertion. We already know that FE->getName() is an absolute path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60558 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-04 22:36:44 +00:00
Ted Kremenek 6183e4815a PTH:
Use an array instead of a DenseMap to cache persistent IDs -> IdentifierInfo*.  This leads to a 4% speedup at -fsyntax-only using PTH.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60452 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-03 01:16:39 +00:00
Ted Kremenek fc7e2ead43 PTH emission:
- Output 32 bit integers using bit-shifting + write of individual bytes.
  This is motivated because we aren't guaranteed to load 32-bit ints of the mmaped PTH file at 4-byte offsets.
- Don't emit flags for IdentifierInfos.  These are lazily populated by the Preprocessor/Parser.
- Only write out tokens for files with absolute paths.  This is potentially temporary, but simplifies things for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60435 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-02 19:44:08 +00:00
Ted Kremenek fa59aad701 - Enhance PTH generation to write out IdentifierInfo table in two parts:
- a table including the IdentifierInfo data
  - an index from persistent IdentifierInfo IDs to indices within this file.
- Enhance PTH generation to write out file map information, mapping inodes to tokens.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60132 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 23:58:26 +00:00
Ted Kremenek a3d764cf77 Re-apply r60071 now that raw_fd_ostream::tell has been committed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60086 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 03:36:26 +00:00
Daniel Dunbar 31309ab547 Revert 60071, depends on uncommitted LLVM changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60077 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 02:18:33 +00:00
Ted Kremenek 4008de8d6a Migrate token-cache generation logic from dummy harness in PPLexerChange.cpp to CacheTokens.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60071 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 00:57:55 +00:00
Daniel Dunbar 26fb272713 [LLVM up] Update for raw_fd_ostream change. This fixes a FIXME that
the Backend output should be done in binary mode.
 - I'd appreciate it if someone who has a Windows build could verify
   this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59221 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-13 05:09:21 +00:00
Ted Kremenek 8588896b47 Added the start of a prototype implementation of PCH based on token caching.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57863 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 00:54:44 +00:00