Skip to content
Snippets Groups Projects
  1. Feb 05, 2016
  2. Mar 23, 2015
  3. Mar 22, 2015
  4. Mar 20, 2015
    • Richard Smith's avatar
      [modules] Remove some redundant work when building a lookup table for a DeclContext. · 1842e330
      Richard Smith authored
      When we need to build the lookup table for a DeclContext, we used to pull in
      all lexical declarations for the context; instead, just build a lookup table
      for the local lexical declarations. We previously didn't guarantee that the
      imported declarations would be in the returned map, but in some cases we'd
      happen to put them all in there regardless. Now we're even lazier about this.
      
      This unnecessary work was papering over some other bugs:
      
       - LookupVisibleDecls would use the DC for name lookups in the TU in C, and
         this was not guaranteed to find all imported names (generally, the DC for
         the TU in C is not a reliable place to perform lookups). We now use an
         identifier-based lookup mechanism for this.
      
       - We didn't actually load in the list of eagerly-deserialized declarations
         when importing a module (so external definitions in a module wouldn't be
         emitted by users of those modules unless they happened to be deserialized
         by the user of the module).
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232793 91177308-0d34-0410-b5e6-96231b3b80d8
      1842e330
  5. Mar 06, 2015
    • Richard Smith's avatar
      [modules] Rework merging of redeclaration chains on module import. · cc533bed
      Richard Smith authored
      We used to save out and eagerly load a (potentially huge) table of merged
      formerly-canonical declarations when we loaded each module. This was extremely
      inefficient in the presence of large amounts of merging, and didn't actually
      save any merging lookup work, because we still needed to perform name lookup to
      check that our merged declaration lists were complete. This also resulted in a
      loss of laziness -- even if we only needed an early declaration of an entity, we
      would eagerly pull in all declarations that had been merged into it regardless.
      
      We now store the relevant fragments of the table within the declarations
      themselves. In detail:
      
       * The first declaration of each entity within a module stores a list of first
         declarations from imported modules that are merged into it.
       * Loading that declaration pre-loads those other entities, so that they appear
         earlier within the redeclaration chain.
       * The name lookup tables list the most recent local lookup result, if there
         is one, or all directly-imported lookup results if not.
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231424 91177308-0d34-0410-b5e6-96231b3b80d8
      cc533bed
  6. Aug 28, 2014
  7. May 26, 2014
  8. Mar 07, 2014
  9. Dec 05, 2013
  10. Oct 08, 2013
  11. Jun 19, 2013
  12. Feb 11, 2013
    • Douglas Gregor's avatar
      [Modules] Cope better with top-level declarations loaded after being declared... · f4e955b6
      Douglas Gregor authored
      [Modules] Cope better with top-level declarations loaded after being declared in the current translation unit <rdar://problem/13189985>.
      
      These two related tweaks to keep the information associated with a
      given identifier correct when the identifier has been given some
      top-level information (say, a top-level declaration) and more
      information is then loaded from a module. The first ensures that an
      identifier that was "interesting" before being loaded from an AST is
      considered to be different from its on-disk counterpart. Otherwise, we
      lose such changes when writing the current translation unit as a
      module.
      
      Second, teach the code that injects AST-loaded names into the
      identifier chain for name lookup to keep the most recent declaration,
      so that we don't end up confusing our declaration chains by having a
      different declaration in there.
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174895 91177308-0d34-0410-b5e6-96231b3b80d8
      f4e955b6
  13. Dec 17, 2012
  14. Dec 04, 2012
  15. Nov 12, 2012
  16. Nov 10, 2012
  17. Jun 06, 2012
  18. May 01, 2012
    • David Blaikie's avatar
      Remove ref/value inconsistency in redecl_iterator. · bd4fa45e
      David Blaikie authored
      Similar to r155808 - this mistake has been made in a few iterators.
      
      Based on Chandler Carruth's feedback to r155808 I added an implicit conversion
      to Decl* to ease adoption/usage. Useful for the pointer comparison, but not the
      dyn_cast (due to template argument deduction causing the conversion not to be
      used) - there for future convenience, though. This idiom (op T* for iterators)
      seems to be fairly idiomatic within the LLVM codebase & I'll likely add it as I
      fix up the other iterators here.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155869 91177308-0d34-0410-b5e6-96231b3b80d8
      bd4fa45e
  19. Mar 11, 2012
  20. Feb 29, 2012
    • James Molloy's avatar
      Reapply r151638 and r151641. · 16f1f717
      James Molloy authored
      The bug that was caught by Apple's internal buildbots was valid and also showed another bug in my implementation.
      
      These are now fixed, with regression tests added to catch them both (not Darwin-specific).
      
      Original log:
      ====================
      
      Revert r151638 because it causes assertion hit on PCH creation for Cocoa.h
      
      Original log:
      ---------------------
      Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped.
      
      This fixes code such as:
      
      enum e {x, y};
      int f(enum {y, x} n) {
       return 0;
      }
      
      This finally fixes PR5464 and PR5477.
      ---------------------
      
      I also reverted r151641 which was enhancement on top of r151638.
      
      ====================
      
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151712 91177308-0d34-0410-b5e6-96231b3b80d8
      16f1f717
    • Argyrios Kyrtzidis's avatar
      Revert r151638 because it causes assertion hit on PCH creation for Cocoa.h · 32a9a754
      Argyrios Kyrtzidis authored
      Original log:
      ---------------------
      Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped.
      
      This fixes code such as:
      
      enum e {x, y};
      int f(enum {y, x} n) {
       return 0;
      }
      
      This finally fixes PR5464 and PR5477.
      ---------------------
      
      I also reverted r151641 which was enhancement on top of r151638.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151667 91177308-0d34-0410-b5e6-96231b3b80d8
      32a9a754
  21. Feb 28, 2012
  22. Jan 24, 2012
  23. Dec 15, 2011
  24. 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
  25. Sep 23, 2011
  26. Mar 24, 2011
  27. Mar 16, 2011
  28. Mar 14, 2011
  29. Mar 07, 2011
  30. Aug 31, 2010
  31. Aug 24, 2010
  32. Aug 21, 2010
  33. Aug 19, 2010
  34. Aug 12, 2010
  35. Jul 30, 2010
  36. Feb 15, 2010
  37. Jan 02, 2010
  38. Sep 09, 2009
Loading