Skip to content
  1. Jan 29, 2011
  2. Jan 08, 2011
  3. Dec 04, 2010
  4. Nov 13, 2010
  5. Nov 01, 2010
  6. Oct 26, 2010
  7. Oct 15, 2010
  8. Sep 17, 2010
    • John McCall's avatar
      Currently we're initializing the vtable pointers of a class only after · 769250ea
      John McCall authored
      the bases are completely initialized.  This won't work --- base
      initializer expressions can rely on the vtables having been set up.
      Check for uses of 'this' in the initializers and force a vtable
      initialization if found.
      
      This might not be good enough;  we might need to extend this to handle
      the possibility of arbitrary code finding an external reference to this
      (not yet completely-constructed!) object and accessing through it,
      in which case we'll probably find ourselves doing a lot more unnecessary
      stores.
      
      llvm-svn: 114153
      769250ea
  9. Sep 15, 2010
    • John McCall's avatar
      one piece of code is responsible for the lifetime of every aggregate · 7a626f63
      John McCall authored
      slot.  The easiest way to do that was to bundle up the information
      we care about for aggregate slots into a new structure which demands
      that its creators at least consider the question.
      
      I could probably be convinced that the ObjC 'needs GC' bit should
      be rolled into this structure.
      Implement generalized copy elision.  The main obstacle here is that
      IR-generation must be much more careful about making sure that exactly
      
      llvm-svn: 113962
      7a626f63
  10. Aug 21, 2010
  11. Aug 11, 2010
  12. Aug 07, 2010
    • John McCall's avatar
      Store inheritance paths after CastExprs instead of inside them. · cf142165
      John McCall authored
      This takes some trickery since CastExpr has subclasses (and indeed,
      is abstract).
      
      Also, smoosh the CastKind into the bitfield from Expr.
      
      Drops two words of storage from Expr in the common case of expressions
      which don't need inheritance paths.  Avoids a separate allocation and
      another word of overhead in cases needing inheritance paths.  Also has
      the advantage of not leaking memory, since destructors for AST nodes are
      never run.
      
      llvm-svn: 110507
      cf142165
  13. Jul 21, 2010
  14. Jul 13, 2010
    • John McCall's avatar
      Teach IR generation how to lazily emit cleanups. This has a lot of advantages, · 2b7fc382
      John McCall authored
      mostly in avoiding unnecessary work at compile time but also in producing more
      sensible block orderings.
      
      Move the destructor cleanups for local variables over to use lazy cleanups.
      Eventually all cleanups will do this;  for now we have some awkward code
      duplication.
      
      Tell IR generation just to never produce landing pads in -fno-exceptions.
      This is a much more comprehensive solution to a problem which previously was
      half-solved by checks in most cleanup-generation spots.
      
      llvm-svn: 108270
      2b7fc382
  15. Jul 07, 2010
  16. Jul 06, 2010
    • John McCall's avatar
      Validated by nightly-test runs on x86 and x86-64 darwin, including after · bd30929e
      John McCall authored
      self-host.  Hopefully these results hold up on different platforms.  
      
      I tried to keep the GNU ObjC runtime happy, but it's hard for me to test.
      Reimplement how clang generates IR for exceptions.  Instead of creating new
      invoke destinations which sequentially chain to the previous destination,
      push a more semantic representation of *why* we need the cleanup/catch/filter
      behavior, then collect that information into a single landing pad upon request.
      
      Also reorganizes how normal cleanups (i.e. cleanups triggered by non-exceptional
      control flow) are generated, since it's actually fairly closely tied in with
      the former.  Remove the need to track which cleanup scope a block is associated
      with.
      
      Document a lot of previously poorly-understood (by me, at least) behavior.
      
      The new framework implements the Horrible Hack (tm), which requires every
      landing pad to have a catch-all so that inlining will work.  Clang no longer
      requires the Horrible Hack just to make exceptions flow correctly within
      a function, however.  The HH is an unfortunate requirement of LLVM's EH IR.
      
      llvm-svn: 107631
      bd30929e
  17. Jul 01, 2010
  18. Jun 26, 2010
  19. Jun 09, 2010
  20. Jun 03, 2010
  21. May 27, 2010
  22. May 22, 2010
  23. May 21, 2010
  24. May 06, 2010
  25. May 05, 2010
    • Douglas Gregor's avatar
      Reimplement code generation for copying fields in the · 94f9a482
      Douglas Gregor authored
      implicitly-generated copy constructor. Previously, Sema would perform
      some checking and instantiation to determine which copy constructors,
      etc., would be called, then CodeGen would attempt to figure out which
      copy constructor to call... but would get it wrong, or poke at an
      uninstantiated default argument, or fail in other ways.
      
      The new scheme is similar to what we now do for the implicit
      copy-assignment operator, where Sema performs all of the semantic
      analysis and builds specific ASTs that look similar to the ASTs we'd
      get from explicitly writing the copy constructor, so that CodeGen need
      only do a direct translation.
      
      However, it's not quite that simple because one cannot explicit write
      elementwise copy-construction of an array. So, I've extended
      CXXBaseOrMemberInitializer to contain a list of indexing variables
      used to copy-construct the elements. For example, if we have:
      
        struct A { A(const A&); };
        
        struct B {
          A array[2][3];
        };
      
      then we generate an implicit copy assignment operator for B that looks
      something like this:
      
        B::B(const B &other) : array[i0][i1](other.array[i0][i1]) { }
      
      CodeGen will loop over the invented variables i0 and i1 to visit all
      elements in the array, so that each element in the destination array
      will be copy-constructed from the corresponding element in the source
      array. Of course, if we're dealing with arrays of scalars or class
      types with trivial copy-assignment operators, we just generate a
      memcpy rather than a loop.
      
      Fixes PR6928, PR5989, and PR6887. Boost.Regex now compiles and passes
      all of its regression tests.
      
      Conspicuously missing from this patch is handling for the exceptional
      case, where we need to destruct those objects that we have
      constructed. I'll address that case separately.
      
      llvm-svn: 103079
      94f9a482
  26. May 04, 2010
  27. May 03, 2010
Loading