- Jan 21, 2009
-
-
Devang Patel authored
llvm-svn: 62638
-
Daniel Dunbar authored
llvm-svn: 62637
-
rdar://problem/6510344Ted Kremenek authored
Fix: <rdar://problem/6510344> [pth] PTH slows down regular lexer considerably (when it has substantial work) Changes to IdentifierTable: - High-level summary: StringMap never owns IdentifierInfos. It just references them. - The string map now has StringMapEntry<IdentifierInfo*> instead of StringMapEntry<IdentifierInfo>. The IdentifierInfo object is allocated using the same bump pointer allocator as used by the StringMap. Changes to IdentifierInfo: - Added an extra pointer to point to the StringMapEntry<IdentifierInfo*> in the string map. This pointer will be null if the IdentifierInfo* is *only* used by the PTHLexer (that is it isn't in the StringMap). Algorithmic changes: - Non-PTH case: IdentifierInfo::get() will always consult the StringMap first to see if we have an IdentifierInfo object. If that StringMapEntry references a null pointer, we allocate a new one from the BumpPtrAllocator and update the reference in the StringMapEntry. - PTH case: We do the same lookup as with the non-PTH case, but if we don't get a hit in the StringMap we do a secondary lookup in the PTHManager for the IdentifierInfo. If we don't find an IdentifierInfo we create a new one as in the non-PTH case. If we do find and IdentifierInfo in the PTHManager, we update the StringMapEntry to refer to it so that the IdentifierInfo will be found on the next StringMap lookup. This way we only do a binary search in the PTH file at most once for a given IdentifierInfo. This greatly speeds things up for source files containing a non-trivial amount of code. Performance impact: While these changes do add some extra indirection in IdentifierTable to access an IdentifierInfo*, I saw speedups even in the non-PTH case as well. Non-PTH: For -fsyntax-only on Cocoa.h, we see a 6% speedup. PTH (with Cocoa.h in token cache): 11% speedup. I also did an experiment where we did -fsyntax-only on a source file including a large header and Cocoa.h, but the token cache did not contain the larger header. For this file, we were seeing a performance *regression* when using PTH of 3% over non-PTH. Now we are seeing a performance improvement of 9%! Tests: The serialization tests are now failing. I looked at this extensively, and I my belief is that this change is unmasking a bug rather than introducing a new one. I have disabled the serialization tests for now. llvm-svn: 62636
-
Daniel Dunbar authored
individual checker options. llvm-svn: 62634
-
- Jan 20, 2009
-
-
Devang Patel authored
llvm-svn: 62625
-
Devang Patel authored
llvm-svn: 62624
-
Sebastian Redl authored
This allows more concise syntax when allocating an object using the ASTContext's allocator. Convert a few allocations to this operator to for test purposes. llvm-svn: 62623
-
Dale Johannesen authored
invoking the host fmod, not by lowering to frem and constant-folding that. Fix this so it tests what I want to test. llvm-svn: 62622
-
Mike Stump authored
llvm-svn: 62621
-
Anders Carlsson authored
llvm-svn: 62620
-
Chris Lattner authored
for whatever llc defaults to. This fixes PR3363 llvm-svn: 62619
-
Daniel Dunbar authored
- This is a hack to allow the Darwin linker to get -final_output when doing universal builds; the mechanism should be generalized. - Handle multiple redundant -arch arguments correctly. - Forward -arch_multiple and -final_output to gcc when necessary. - Simplified implementation of derived gcc tools. llvm-svn: 62618
-
Evan Cheng authored
Fix PR3243: a LiveVariables bug. When HandlePhysRegKill is checking whether the last reference is also the last def (i.e. dead def), it should also check if last reference is the current machine instruction being processed. This can happen when it is processing a physical register use and setting the current machine instruction as sub-register's last ref. llvm-svn: 62617
-
Duncan Sands authored
llvm-svn: 62616
-
Bill Wendling authored
causing the limited precision stuff to produce the wrong result for values in the range [0, 1). llvm-svn: 62615
-
Mike Stump authored
llvm-svn: 62614
-
Chris Lattner authored
caused by my previous commit. llvm-svn: 62613
-
Steve Naroff authored
When using a BumpPtrAllocator, this reduces malloc overhead from 2.2->1.9% (for Cocoa.h). At this point, malloc() has dropped the fourth most expensive routine (behind Preprocessor::HandleIdentifier()). llvm-svn: 62612
-
Douglas Gregor authored
llvm-svn: 62611
-
Devang Patel authored
llvm-svn: 62610
-
-
Fariborz Jahanian authored
case. llvm-svn: 62607
-
Steve Naroff authored
Add debug hook to DeclContext. llvm-svn: 62605
-
Evan Cheng authored
llvm-svn: 62604
-
Devang Patel authored
llvm-svn: 62603
-
Devang Patel authored
llvm-svn: 62602
-
Fariborz Jahanian authored
llvm-svn: 62601
-
Evan Cheng authored
llvm-svn: 62600
-
Chris Lattner authored
function DeclaratorChunk in common cases. This uses a fixed array in Declarator when it is small enough for the first function declarator chunk in a declarator. This eliminates all malloc/free traffic from DeclaratorChunk::getFunction when running on Cocoa.h except for five functions: signal/bsd_signal/sigset, which have multiple Function DeclChunk's, and CFUUIDCreateWithBytes/CFUUIDGetConstantUUIDWithBytes, which take more than 16 arguments. This patch was pair programmed with Steve. llvm-svn: 62599
-
Devang Patel authored
llvm-svn: 62598
-
Devang Patel authored
llvm-svn: 62596
-
Devang Patel authored
llvm-svn: 62594
-
Dale Johannesen authored
fully implemented yet and not used. This is mainly to clarify that APFloat::mod implements C fmod, not remainder. llvm-svn: 62593
-
Chris Lattner authored
Patrick Boettcher! llvm-svn: 62592
-
Chris Lattner authored
llvm-svn: 62591
-
Chris Lattner authored
llvm-svn: 62590
-
Devang Patel authored
llvm-svn: 62589
-
Duncan Sands authored
accidentally reverted again. llvm-svn: 62587
-
Eli Friedman authored
llvm-svn: 62586
-
Eli Friedman authored
struct. llvm-svn: 62585
-