1. Apr 23, 2009
    • Douglas Gregor's avatar
      Minimize the number and kind of "external definitions" that the PCH · b985eebc
      Douglas Gregor authored
      file needs to store. CodeGen needs to see these definitions (via
      HandleTopLevelDecl), otherwise it won't be able to generate code for
      them. 
      
      This patch notifies the consumer (e.g., CodeGen) about function
      definitions and variable definitions when the corresponding
      declarations are deserialized. Hence, we don't eagerly deserialize the
      declarations for every variable or function that has a definition in
      the PCH file. This gives another 5% speedup for the Carbon-prefixed
      "Hello, World!", and brings our PCH statistics down to something far
      more reasonable:
      
      *** PCH Statistics:
        13/20693 types read (0.062823%)
        17/59230 declarations read (0.028702%)
        54/44914 identifiers read (0.120230%)
        0/32954 statements read (0.000000%)
        5/6187 macros read (0.080815%)
      
      llvm-svn: 69820
      b985eebc
    • Chris Lattner's avatar
      Add missing dependency, patch by Jason Haslam! · 63660175
      Chris Lattner authored
      llvm-svn: 69819
      63660175
    • Duncan Sands's avatar
      Testcase for PR2958. · 7bccadac
      Duncan Sands authored
      llvm-svn: 69818
      7bccadac
    • Devang Patel's avatar
      Fix cut-n-pasto. · 51c36190
      Devang Patel authored
      llvm-svn: 69816
      51c36190
    • Douglas Gregor's avatar
      Lazy loading of builtins for precompiled headers. · 4621c6ae
      Douglas Gregor authored
      PCH files now contain complete information about builtins, including
      any declarations that have been synthesized as part of building the
      PCH file. When using a PCH file, we do not initialize builtins at all;
      when needed, they'll be found in the PCH file.
      
      This optimization translations into a 9% speedup for "Hello, World!"
      with Carbon.h as a prefix header and roughly a 5% speedup for 403.gcc
      with its prefix header. We're also reading less of the PCH file for
      "Hello, World!":
      
      *** PCH Statistics:
        286/20693 types read (1.382110%)
        1630/59230 declarations read (2.751984%)
        764/44914 identifiers read (1.701029%)
        1/32954 statements read (0.003035%)
        5/6187 macros read (0.080815%)
      
      down from
      
      *** PCH Statistics:
        411/20693 types read (1.986179%)
        2553/59230 declarations read (4.310316%)
        1093/44646 identifiers read (2.448148%)
        1/32954 statements read (0.003035%)
        21/6187 macros read (0.339421%)
      
      llvm-svn: 69815
      4621c6ae
    • Ted Kremenek's avatar
      BugReporter (extensive diagnostics): · 6c867a14
      Ted Kremenek authored
      - Remove stale assertion that was breaking the test suite.
      - When popping location contexts, only add a control-flow piece for fileID
        locations.
      
      llvm-svn: 69814
      6c867a14
    • Ted Kremenek's avatar
      BugReporter (extensive diagnostic algorithm): The initial control-flow edge now · 0752a5df
      Ted Kremenek authored
      starts from the first character of the first statement.
      
      llvm-svn: 69813
      0752a5df
    • Ted Kremenek's avatar
      PathDiagnosticLocation: ranges for terminators now only include the first · 22579c4c
      Ted Kremenek authored
      character instead of the entire range for the IfStmt, ForStmt, etc. We may
      gradually refine these ranges later, but basically terminator ranges just refer
      to the first keyword.
      
      llvm-svn: 69812
      22579c4c
    • Daniel Dunbar's avatar
      Reapply r69771, with updates & fixes: · e4f25b70
      Daniel Dunbar authored
      Rework the shadow struct that is layed out for Objective-C classes.
      
       - Superclasses are now always laid out in their shadow structure at
         the first field.
      
       - Prior to this, the entire class heirarchy was flattened into a
         single structure which meant that alignment, padding, and bitfields
         were incorrect (the ASTRecordLayout was correct however, which
         meant our debug info didn't coincide with ivar offsets, for
         example).
      
       - This is still very suboptimal (for example, ivar are looked up
         recursively, but I believe the ivar layout itself is now at least
         close to correct.
      
       - <rdar://problem/6773388> error: objc[29823]: layout bitmap sliding
         backwards
      
      llvm-svn: 69811
      e4f25b70
    • David Greene's avatar
      Implement multiclass inheritance. · 753ed8fd
      David Greene authored
      llvm-svn: 69810
      753ed8fd
    • Dan Gohman's avatar
      Simplify trivial cast-of-cast SCEVs. · 79af854f
      Dan Gohman authored
      llvm-svn: 69809
      79af854f
    • Dan Gohman's avatar
      SCEVExpander's InsertCastOfTo knows how to move existing cast · 54fd2869
      Dan Gohman authored
      instructions in order to avoid inserting new ones. However, if
      the cast instruction is the SCEVExpander's InsertPt, this
      causes subsequently emitted instructions to be inserted near
      the cast, and not at the location of the original insert point.
      Fix this by adjusting the insert point in such cases.
      This fixes PR4009.
      
      llvm-svn: 69808
      54fd2869
    • Dan Gohman's avatar
      Use BasicBlock::iterator instead of Instruction* for insert points, · 9dd9a45e
      Dan Gohman authored
      to better handle inserting instructions at the end of a block.
      
      llvm-svn: 69807
      9dd9a45e
    • Dan Gohman's avatar
      Make SCEVExpanders private methods private, instead of protected. · 87d138c3
      Dan Gohman authored
      llvm-svn: 69806
      87d138c3
  2. Apr 22, 2009