Skip to content
  1. Jan 21, 2009
    • Devang Patel's avatar
      Encode member accessibility. · 19f2dd79
      Devang Patel authored
      llvm-svn: 62638
      19f2dd79
    • Daniel Dunbar's avatar
      ccc: Unbreak -pipe handling broken in previous refactoring. · 47d16e53
      Daniel Dunbar authored
      llvm-svn: 62637
      47d16e53
    • Ted Kremenek's avatar
      Fix: <rdar://problem/6510344> [pth] PTH slows down regular lexer considerably... · 52f73cad
      Ted 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
      52f73cad
    • Daniel Dunbar's avatar
      Add -analyze action to run static analyzer, instead of inferring from · 34fc92fd
      Daniel Dunbar authored
      individual checker options.
      
      llvm-svn: 62634
      34fc92fd
  2. Jan 20, 2009
Loading