Skip to content
  1. Jun 19, 2010
  2. Jun 16, 2010
  3. Jun 15, 2010
  4. Jun 11, 2010
  5. Jun 09, 2010
  6. May 27, 2010
  7. May 25, 2010
    • Charles Davis's avatar
      IRgen: Add a stub class for generating ABI-specific C++ code. · 4e786ddc
      Charles Davis authored
      This class only supports name mangling (which is apparently used during C/ObjC
      codegen). For now only the Itanium C++ ABI is supported. Patches to add a
      second C++ ABI are forthcoming.
      
      llvm-svn: 104630
      4e786ddc
    • John McCall's avatar
      If a function definition has any sort of weak linkage, its static local · 7cb0220e
      John McCall authored
      variables should have that linkage.  Otherwise, its static local
      variables should have internal linkage.  To avoid computing this excessively,
      set a function's linkage before we emit code for it.
      
      Previously we were assigning weak linkage to the static variables of
      static inline functions in C++, with predictably terrible results.  This
      fixes that and also gives better linkage than 'weak' when merging is required.
      
      llvm-svn: 104581
      7cb0220e
  8. May 13, 2010
    • Douglas Gregor's avatar
      Disable the available_externally optimization for inline virtual · 500d9f82
      Douglas Gregor authored
      methods for which the key function is guaranteed to be in another
      translation unit. Unfortunately, this guarantee isn't the case when
      dealing with shared libraries that fail to export these virtual method
      definitions. 
      
      I'm reopening PR6747 so we can consider this again at a later point in
      time.
      
      llvm-svn: 103741
      500d9f82
    • Douglas Gregor's avatar
      Rework when and how vtables are emitted, by tracking where vtables are · 88d292cc
      Douglas Gregor authored
      "used" (e.g., we will refer to the vtable in the generated code) and
      when they are defined (i.e., because we've seen the key function
      definition). Previously, we were effectively tracking "potential
      definitions" rather than uses, so we were a bit too eager about emitting
      vtables for classes without key functions. 
      
      The new scheme:
        - For every use of a vtable, Sema calls MarkVTableUsed() to indicate
        the use. For example, this occurs when calling a virtual member
        function of the class, defining a constructor of that class type,
        dynamic_cast'ing from that type to a derived class, casting
        to/through a virtual base class, etc.
        - For every definition of a vtable, Sema calls MarkVTableUsed() to
        indicate the definition. This happens at the end of the translation
        unit for classes whose key function has been defined (so we can
        delay computation of the key function; see PR6564), and will also
        occur with explicit template instantiation definitions.
       - For every vtable defined/used, we mark all of the virtual member
       functions of that vtable as defined/used, unless we know that the key
       function is in another translation unit. This instantiates virtual
       member functions when needed.
        - At the end of the translation unit, Sema tells CodeGen (via the
        ASTConsumer) which vtables must be defined (CodeGen will define
        them) and which may be used (for which CodeGen will define the
        vtables lazily). 
      
      From a language perspective, both the old and the new schemes are
      permissible: we're allowed to instantiate virtual member functions
      whenever we want per the standard. However, all other C++ compilers
      were more lazy than we were, and our eagerness was both a performance
      issue (we instantiated too much) and a portability problem (we broke
      Boost test cases, which now pass).
      
      Notes:
        (1) There's a ton of churn in the tests, because the order in which
        vtables get emitted to IR has changed. I've tried to isolate some of
        the larger tests from these issues.
        (2) Some diagnostics related to
        implicitly-instantiated/implicitly-defined virtual member functions
        have moved to the point of first use/definition. It's better this
        way.
        (3) I could use a review of the places where we MarkVTableUsed, to
        see if I missed any place where the language effectively requires a
        vtable.
      
      Fixes PR7114 and PR6564.
      
      llvm-svn: 103718
      88d292cc
  9. May 07, 2010
    • Douglas Gregor's avatar
      Do not give implicitly-defined virtual members functions · d8bb3aff
      Douglas Gregor authored
      available_externally linkage, since they may not have been given a
      strong definition in another translation unit. Without this patch, the
      following test case fails to link with a GCC-compiled libstdc++:
      
        #include <sstream>
        int main() { std::basic_stringbuf<char> bs; }
      
      Fixes the last problem with the Boost.IO library.
      
      llvm-svn: 103208
      d8bb3aff
  10. May 05, 2010
  11. Apr 28, 2010
  12. Apr 24, 2010
  13. Apr 23, 2010
  14. Apr 22, 2010
  15. Apr 19, 2010
  16. Apr 17, 2010
  17. Apr 13, 2010
  18. Apr 10, 2010
  19. Apr 08, 2010
    • Douglas Gregor's avatar
      Eliminate excessive PCH deserialization caused by the search for · eadd3cac
      Douglas Gregor authored
      __cxxabiv1::__fundamental_type_info in every translation
      unit. Previously, we would perform name lookup for
      __cxxabiv1::__fundamental_type_info at the end of IRGen for a each
      translation unit, to determine whether it was present. If so, we we
      produce type information for all of the fundamental types. However,
      this name lookup causes PCH deserialization of a significant part of the
      translation unit, which has a woeful impact on performance.
      
      With this change, we now look at each record type after we've
      generated its vtable to see if it is
      __cxxabiv1::__fundamental_type_info. If so, we generate type info for
      all of the fundamental types. This works because
      __cxxabiv1::__fundamental_type_info should always have a key function
      (typically the virtual destructor), that will be defined once in the
      support library. The fundamental type information will end up there.
      
      Fixes <rdar://problem/7840011>.
      
      llvm-svn: 100772
      eadd3cac
  20. Apr 04, 2010
  21. Apr 02, 2010
  22. Apr 01, 2010
  23. Mar 31, 2010
  24. Mar 30, 2010
  25. Mar 27, 2010
  26. Mar 23, 2010
Loading