Skip to content
Snippets Groups Projects
  1. Jul 01, 2015
  2. Jun 23, 2015
  3. Jun 22, 2015
  4. May 14, 2015
  5. Apr 23, 2015
  6. Aug 13, 2014
  7. Jan 12, 2013
  8. Oct 11, 2012
    • Douglas Gregor's avatar
      Deserialize macro history when we deserialize an identifier that has · 6c6c54a5
      Douglas Gregor authored
      macro history.
      
      When deserializing macro history, we arrange history such that the
      macros that have definitions (that haven't been #undef'd) and are
      visible come at the beginning of the list, which is what the
      preprocessor and other clients of Preprocessor::getMacroInfo()
      expect. If additional macro definitions become visible later, they'll
      be moved toward the front of the list. Note that it's possible to have
      ambiguities, but we don't diagnose them yet.
      
      There is a partially-implemented design decision here that, if a
      particular identifier has been defined or #undef'd within the
      translation unit, that definition (or #undef) hides any macro
      definitions that come from imported modules. There's still a little
      work to do to ensure that the right #undef'ing happens.
      
      Additionally, we'll need to scope the update records for #undefs, so
      they only kick in when the submodule containing that update record
      becomes visible.
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165682 91177308-0d34-0410-b5e6-96231b3b80d8
      6c6c54a5
  9. Oct 27, 2011
    • Douglas Gregor's avatar
      Make the loading of information attached to an IdentifierInfo from an · eee242ff
      Douglas Gregor authored
      AST file more lazy, so that we don't eagerly load that information for
      all known identifiers each time a new AST file is loaded. The eager
      reloading made some sense in the context of precompiled headers, since
      very few identifiers were defined before PCH load time. With modules,
      however, a huge amount of code can get parsed before we see an
      @import, so laziness becomes important here.
      
      The approach taken to make this information lazy is fairly simple:
      when we load a new AST file, we mark all of the existing identifiers
      as being out-of-date. Whenever we want to access information that may
      come from an AST (e.g., whether the identifier has a macro definition,
      or what top-level declarations have that name), we check the
      out-of-date bit and, if it's set, ask the AST reader to update the
      IdentifierInfo from the AST files. The update is a merge, and we now
      take care to merge declarations before/after imports with declarations
      from multiple imports.
      
      The results of this optimization are fairly dramatic. On a small
      application that brings in 14 non-trivial modules, this takes modules
      from being > 3x slower than a "perfect" PCH file down to 30% slower
      for a full rebuild. A partial rebuild (where the PCH file or modules
      can be re-used) is down to 7% slower. Making the PCH file just a
      little imperfect (e.g., adding two smallish modules used by a bunch of
      .m files that aren't in the PCH file) tips the scales in favor of the
      modules approach, with 24% faster partial rebuilds.
      
      This is just a first step; the lazy scheme could possibly be improved
      by adding versioning, so we don't search into modules we already
      searched. Moreover, we'll need similar lazy schemes for all of the
      other lookup data structures, such as DeclContexts.
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143100 91177308-0d34-0410-b5e6-96231b3b80d8
      eee242ff
  10. Oct 30, 2010
  11. Aug 19, 2010
  12. Jan 04, 2010
Loading