Skip to content
  1. Jul 22, 2009
  2. Apr 22, 2009
    • Douglas Gregor's avatar
      Lazy deserialization of the declaration chains associated with · a868bbd3
      Douglas Gregor authored
      identifiers from a precompiled header.
      
      This patch changes the primary name lookup method for entities within
      a precompiled header. Previously, we would load all of the names of
      declarations at translation unit scope into a large DenseMap (inside
      the TranslationUnitDecl's DeclContext), and then perform a special
      "last resort" lookup into this DeclContext when we knew there was a
      PCH file (see Sema::LookupName). Now, when we see an identifier named
      for the first time, we load all of the declarations with that name
      that are visible from the translation unit into the IdentifierInfo's
      chain of declarations. Thus, the explicit "look into the translation
      unit's DeclContext" code is gone, and Sema effectively uses the same
      IdentifierInfo-based name lookup mechanism whether we are using a PCH
      file or not. 
      
      This approach should help PCH scale with the size of the input program
      rather than the size of the PCH file. The "Hello, World!" application
      with Carbon.h as a PCH file now loads 20% of the identifiers in the
      PCH file rather than 85% of the identifiers. 
      
      90% of the 20% of identifiers loaded are actually loaded when we
      deserialize the preprocessor state. The next step is to make the
      preprocessor load macros lazily, which should drastically reduce the
      number of types, declarations, and identifiers loaded for "Hello,
      World".
      
      llvm-svn: 69737
      a868bbd3
  3. Apr 20, 2009
  4. Apr 19, 2009
  5. Apr 14, 2009
  6. Mar 29, 2009
    • Chris Lattner's avatar
      Push DeclGroup much farther throughout the compiler. Now the various · 5bbb3c8a
      Chris Lattner authored
      productions (except the already broken ObjC cases like @class X,Y;) in 
      the parser that can produce more than one Decl return a DeclGroup instead
      of a Decl, etc.
      
      This allows elimination of the Decl::NextDeclarator field, and exposes
      various clients that should look at all decls in a group, but which were
      only looking at one (such as the dumper, printer, etc).  These have been
      fixed.
      
      Still TODO:
      
      1) there are some FIXME's in the code about potentially using
      DeclGroup for better location info.
      2) ParseObjCAtDirectives should return a DeclGroup due to @class etc.
      3) I'm not sure what is going on with StmtIterator.cpp, or if it can
         be radically simplified now.
      4) I put a truly horrible hack in ParseTemplate.cpp.
      
      I plan to bring up #3/4 on the mailing list, but don't plan to tackle
      #1/2 in the short term.
      
      llvm-svn: 68002
      5bbb3c8a
  7. Mar 28, 2009
  8. Jan 28, 2009
  9. Jan 20, 2009
  10. Oct 27, 2008
  11. Oct 16, 2008
    • Daniel Dunbar's avatar
      Add --disable-free flag to clang. · 33d29b3e
      Daniel Dunbar authored
       - Disables the freeing of the ASTContext and the TranslationUnit
         after parsing & sema.
       - Primarily for timing the impact on -fsyntax-only timings.
      
      llvm-svn: 57643
      33d29b3e
  12. Aug 20, 2008
  13. Aug 11, 2008
    • Daniel Dunbar's avatar
      More #include cleaning · 56fdb6ae
      Daniel Dunbar authored
       - Kill unnecessary #includes in .cpp files. This is an automatic
         sweep so some things removed are actually used, but happen to be
         included by a previous header. I tried to get rid of the obvious
         examples and this was the easiest way to trim the #includes in one
         fell swoop.
       - We now return to regularly scheduled development.
      
      llvm-svn: 54632
      56fdb6ae
    • Daniel Dunbar's avatar
      More #include cleaning · 221fa94e
      Daniel Dunbar authored
       - Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and
         SourceLocation.h)
       - Move ASTContext constructor into implementation
      
      llvm-svn: 54627
      221fa94e
  14. Aug 08, 2008
  15. Aug 07, 2008
  16. Jul 02, 2008
  17. Jun 16, 2008
  18. Jun 04, 2008
  19. May 31, 2008
  20. May 27, 2008
  21. May 20, 2008
    • Ted Kremenek's avatar
      Try to plug some memory leaks... · ce20e8fe
      Ted Kremenek authored
      1) Sema::ParseAST now constructs a TranslationUnit object to own the top-level Decls, which releases the top-level Decls upon exiting ParseAST.
      
      2) Bug fix: TranslationUnit::~TranslationUnit handles the case where a Decl is added more than once as a top-level Decl.
      
      3) Decl::Destroy is now a virtual method, obviating the need for a special dispatch based on DeclKind.
      
      3) FunctionDecl::Destroy now releases its Body using its Destroy method.
      
      4) Added Stmt::Destroy and Stmt::DestroyChildren, which recursively delete the child ASTs of a Stmt and call their dstors.  We may need to special case dstor/Destroy methods for particular Stmt subclasses that own other dynamically allocated objects besides AST nodes.
      
      5) REGRESSION: We temporarily are not deallocating attributes; a FIXME is provided.
      
      llvm-svn: 51286
      ce20e8fe
  22. Mar 16, 2008
    • Chris Lattner's avatar
      Make a major restructuring of the clang tree: introduce a top-level · 7a51313d
      Chris Lattner authored
      lib dir and move all the libraries into it.  This follows the main
      llvm tree, and allows the libraries to be built in parallel.  The
      top level now enforces that all the libs are built before Driver,
      but we don't care what order the libs are built in.  This speeds
      up parallel builds, particularly incremental ones.
      
      llvm-svn: 48402
      7a51313d
  23. Feb 06, 2008
  24. Dec 29, 2007
  25. Dec 19, 2007
  26. Nov 30, 2007
    • Steve Naroff's avatar
      · 205ec3d0
      Steve Naroff authored
      Yesterday, I simplified how we stream top-level decls.
      
      After a discussion with Ted, we both came to the conclusion that adding a "HandleTopLevelDeclaration" hook to ASConsumer is far more elegant. The default implementation of HandleTopLevelDeclaration will be responsible for iterating over the ScopedDecl (which has a chain of the decls:-).
      
      TODO: Once Ted adds HandleTopLevelDeclaration, make sure TagDecls are chainged appropriately...
      llvm-svn: 44445
      205ec3d0
  27. Nov 28, 2007
    • Steve Naroff's avatar
      · 197616c3
      Steve Naroff authored
      Several fixes/simplifications surrounding how we stream top-level decl AST's.
      
      The following code...
      
      typedef struct cssm_data {} CSSM_DATA, *CSSM_DATA_PTR;
      
      struct Y { int A; };
      
      struct X { int A; } D; 
      
      struct X E, F;
      
      ...now produces the following output...
      
      > ../../Debug/bin/clang xx.c -ast-print
      Read top-level tag decl: 'cssm_data'
      typedef struct cssm_data CSSM_DATA;
      typedef struct cssm_data *CSSM_DATA_PTR;
      Read top-level tag decl: 'Y'
      Read top-level tag decl: 'X'
      Read top-level variable decl: 'D'
      Read top-level variable decl: 'E'
      Read top-level variable decl: 'F'
      
      ...which is much more accurate than the previous -ast-print output...
      
      typedef struct cssm_data CSSM_DATA;
      typedef struct cssm_data CSSM_DATA;
      Read top-level variable decl: 'D'
      Read top-level variable decl: 'E'
      Read top-level variable decl: 'E'
      
      llvm-svn: 44421
      197616c3
  28. Nov 03, 2007
  29. Oct 26, 2007
Loading