- Jan 18, 2009
-
-
Chris Lattner authored
internally. This is just a cleanup that reduces the need to cast to unsigned char before assembling a larger integer. llvm-svn: 62442
-
- Jan 17, 2009
-
-
Chris Lattner authored
the chunk ID not the file ID. This exposes problems in TextDiagnosticPrinter where it should have been using the canonical file ID but wasn't. Fix these along the way. llvm-svn: 62427
-
Chris Lattner authored
llvm-svn: 62426
-
Chris Lattner authored
method. This lets us clean up the interface and make it more obvious that this method is *really really* _Pragma specific. Note that _Pragma handling uglifies the Lexer in the critical path. It would be very interesting to consider making _Pragma remapping be a new special lexer class of its own. llvm-svn: 62425
-
Chris Lattner authored
llvm-svn: 62424
-
Chris Lattner authored
of a SourceLocation. This should speed it up and definitely simplifies it. llvm-svn: 62422
-
Chris Lattner authored
creating a whole lexer when we just want one static method. llvm-svn: 62420
-
Chris Lattner authored
llvm-svn: 62419
-
Chris Lattner authored
embedded magic. llvm-svn: 62417
-
Chris Lattner authored
entire file. llvm-svn: 62414
-
Chris Lattner authored
llvm-svn: 62411
-
Chris Lattner authored
the implementation of PTHManager::getSpelling. llvm-svn: 62408
-
Chris Lattner authored
"FileID" a concept that is now enforced by the compiler's type checker instead of yet-another-random-unsigned floating around. This is an important distinction from the "FileID" currently tracked by SourceLocation. *That* FileID may refer to the start of a file or to a chunk within it. The new FileID *only* refers to the file (and its #include stack and eventually #line data), it cannot refer to a chunk. FileID is a completely opaque datatype to all clients, only SourceManager is allowed to poke and prod it. llvm-svn: 62407
-
Chris Lattner authored
content cache directly. Content cache has a 1-1 mapping with fileentries, whereas multiple FileIDs can be the same FileEntry. llvm-svn: 62401
-
- Jan 16, 2009
-
-
Chris Lattner authored
llvm-svn: 62368
-
Chris Lattner authored
if warnings in system headers are disabled. isIdenticalTo can end up calling the expensive getSpelling method, and other bad stuff and is completely unneeded if the warning will be discarded anyway. rdar://6502956 llvm-svn: 62347
-
Chris Lattner authored
llvm-svn: 62334
-
Chris Lattner authored
notifying PPCallbacks about it. llvm-svn: 62333
-
Chris Lattner authored
into its ctor. Also, make it handle validity checking of pascal strings instead of making clients do it. llvm-svn: 62332
-
Chris Lattner authored
documented here: http://msdn.microsoft.com/en-us/library/7f0aews7(VS.80).aspx This is according to my understanding reading the docs, I don't know if it really agrees fully with what VC++ allows. llvm-svn: 62317
-
Chris Lattner authored
"logical" location, refer to the "instantiation" location. llvm-svn: 62316
-
Chris Lattner authored
llvm-svn: 62313
-
Chris Lattner authored
llvm-svn: 62311
-
Chris Lattner authored
the "physical" location of tokens, refer to the "spelling" location. This is more concrete and useful, tokens aren't really physical objects! llvm-svn: 62309
-
- Jan 15, 2009
-
-
Ted Kremenek authored
llvm-svn: 62277
-
Ted Kremenek authored
- IdentifierInfo can now (optionally) have its string data not be co-located with itself. This is for use with PTH. This aspect is a little gross, as getName() and getLength() now make assumptions about a possible alternate representation of IdentifierInfo. Perhaps we should make IdentifierInfo have virtual methods? IdentifierTable: - Added class "IdentifierInfoLookup" that can be used by IdentifierTable to perform "string -> IdentifierInfo" lookups using an auxilliary data structure. This is used by PTH. - Perform tests show that IdentifierTable::get() does not slow down because of the extra check for the IdentiferInfoLookup object (the regular StringMap lookup does enough work to mitigate the impact of an extra null pointer check). - The upshot is that now that some IdentifierInfo objects might be owned by the IdentiferInfoLookup object. This should be reviewed. PTH: - Modified PTHManager::GetIdentifierInfo to *not* insert entries in IdentifierTable's string map, and instead create IdentifierInfo objects on the fly when mapping from persistent IDs to IdentifierInfos. This saves a ton of work with string copies, hashing, and StringMap lookup and resizing. This change was motivated because when processing source files in the PTH cache we don't need to do any string -> IdentifierInfo lookups. - PTHManager now subclasses IdentifierInfoLookup, allowing clients of IdentifierTable to transparently use IdentifierInfo objects managed by the PTH file. PTHManager resolves "string -> IdentifierInfo" queries by doing a binary search over a sorted table of identifier strings in the PTH file (the exact algorithm we use can be changed as needed). These changes lead to the following performance changes when using PTH on Cocoa.h: - fsyntax-only: 10% performance improvement - Eonly: 30% performance improvement llvm-svn: 62273
-
Ted Kremenek authored
lexical order of the corresponding identifier strings. This will be used for a forthcoming optimization. This slows down PTH generation time by 7%. We can revert this change if the optimization proves to not be valuable. llvm-svn: 62248
-
- Jan 14, 2009
-
-
Ted Kremenek authored
- Use canonical FileID when using getSpelling() caching. This addresses some cache misses we were seeing with -fsyntax-only on Cocoa.h - Added Preprocessor::getPhysicalCharacterAt() utility method for clients to grab the first character at a specified sourcelocation. This uses the PTH spelling cache. - Modified Sema::ActOnNumericConstant() to use Preprocessor::getPhysicalCharacterAt() instead of SourceManager::getCharacterData() (to get PTH hits). These changes cause -fsyntax-only to not page in any sources from Cocoa.h. We see a speedup of 27%. llvm-svn: 62193
-
- Jan 13, 2009
-
-
Ted Kremenek authored
llvm-svn: 62187
-
Ted Kremenek authored
PTH: Fix remaining cases where the spelling cache in the PTH file was being missed when it shouldn't. This shaves another 7% off PTH time for -Eonly on Cocoa.h llvm-svn: 62186
-
- Jan 09, 2009
-
-
Ted Kremenek authored
- Refactor caching logic into a helper class PTHSpellingSearch - Allow "random accesses" in the spelling cache, thus catching the remaining cases where 'getSpelling' wasn't hitting the PTH cache For -Eonly, PTH, Cocoa.h: - This reduces wall time by 3% (user time unchanged, sys time reduced) - This reduces the amount of paged source by 1112K. The remaining 1112K still being paged in is from somewhere else (investigating). llvm-svn: 62009
-
Ted Kremenek authored
llvm-svn: 61961
-
- Jan 08, 2009
-
-
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
-
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
-
- Jan 06, 2009
-
-
Chris Lattner authored
avoid the version of Preprocessor::getSpelling that returns an std::string. llvm-svn: 61769
-
- Jan 05, 2009
-
-
Chris Lattner authored
their length. llvm-svn: 61734
-
- Dec 25, 2008
-
-
Steve Naroff authored
llvm-svn: 61431
-
Steve Naroff authored
Change preprocessor implementation of _cdecl to reference __cdecl. llvm-svn: 61430
-
- Dec 24, 2008
-
-
Steve Naroff authored
Remove previous __declspec macro that would effectively erase the construct prior to parsing. llvm-svn: 61422
-
- Dec 23, 2008
-
-
Ted Kremenek authored
llvm-svn: 61382
-