Skip to content
  1. Apr 17, 2012
  2. Apr 11, 2012
  3. Mar 30, 2012
    • Chandler Carruth's avatar
      Revert r153723, and its follow-ups r153728 and r153733. · 84537952
      Chandler Carruth authored
      These patches cause us to miscompile and/or reject code with static
      function-local variables in an extern-C context. Previously, we were
      papering over this as long as the variables are within the same
      translation unit, and had not seen any failures in the wild. We still
      need a proper fix, which involves mangling static locals inside of an
      extern-C block (as GCC already does), but this patch causes pretty
      widespread regressions. Firefox, and many other applications no longer
      build.
      
      Lots of test cases have been posted to the list in response to this
      commit, so there should be no problem reproducing the issues.
      
      llvm-svn: 153768
      84537952
    • John McCall's avatar
      Do the static-locals thing properly in the face of unions and · 87590e60
      John McCall authored
      other things which might mess with the variable's type.
      
      llvm-svn: 153733
      87590e60
    • Bill Wendling's avatar
      The UTF16 string referenced by a CFString should go into the __TEXT,__ustring · 82b87f19
      Bill Wendling authored
      section. A 'normal' string will go into the __TEXT,__const section, but this
      isn't good for UTF16 strings. The __ustring section allows for coalescing, among
      other niceties (such as allowing the linker to easily split up strings).
      
      Instead of outputting the UTF16 string as a series of bytes, output it as a
      series of shorts. The back-end will then nicely place the UTF16 string into the
      correct section, because it's a mensch.
      <rdar://problem/10655949>
      
      llvm-svn: 153710
      82b87f19
    • Bill Wendling's avatar
      Fix whitespace. · 07635cc7
      Bill Wendling authored
      llvm-svn: 153698
      07635cc7
  4. Mar 26, 2012
  5. Mar 24, 2012
  6. Mar 11, 2012
  7. Mar 08, 2012
  8. Mar 05, 2012
    • Rafael Espindola's avatar
      Fix a small difference in sema and codegen views of what needs to be output. · 189fa748
      Rafael Espindola authored
      In the included testcase, soma thinks that we already have a definition after we
      see the out of line decl. Codegen puts it in a deferred list, to be output if
      a use is seen. This would break when we saw an explicit template instantiation
      definition, since codegen would not be notified.
      
      This patch adds a method to the consumer interface so that soma can notify
      codegen that this decl is now required.
      
      llvm-svn: 152024
      189fa748
  9. Mar 03, 2012
  10. Feb 28, 2012
  11. Feb 25, 2012
    • Sebastian Redl's avatar
      CodeGen support for global variables of type std::initializer_list<X>. · 4a7eab25
      Sebastian Redl authored
      This emits a backing array with internal linkage and fills it with data,
      then has the initializer_list point at the array. Dynamic initialization
      and global destructors are correctly supported.
      
      What doesn't work is nested initializer_lists. I have no idea how to
      get them to work, either. However, these should be very rare, and so
      I'll just call it a known bug and declare generalized initializers
      DONE!
      
      llvm-svn: 151457
      4a7eab25
  12. Feb 18, 2012
  13. Feb 17, 2012
    • Richard Smith's avatar
      Bug fix: do not emit static const local variables with mutable members · e070fd2a
      Richard Smith authored
      as constants.
      
      Refactor and simplify all the separate checks for whether a type can be
      emitted as a constant.
      
      llvm-svn: 150793
      e070fd2a
    • Richard Smith's avatar
      When performing IRGen on a global, emit it as a constant if: · ae819500
      Richard Smith authored
       1) It has a const-qualified type, and
       2) It has no mutable members, and
       3) It has no dynamic initialization, and
       4) It has trivial destruction.
      Remove the unnecessary requirement that the type be POD. This allows us to
      mark all constexpr objects with no mutable members as 'constant'.
      
      llvm-svn: 150792
      ae819500
    • John McCall's avatar
      Whether an argument is required (in contrast with being an · a729c62b
      John McCall authored
      optional argument passed through the variadic ellipsis)
      potentially affects how we need to lower it.  Propagate
      this information down to the various getFunctionInfo(...)
      overloads on CodeGenTypes.  Furthermore, rename those
      overloads to clarify their distinct purposes, and make
      sure we're calling the right one in the right place.
      This has a nice side-effect of making it easier to construct
      a function type, since the 'variadic' bit is no longer
      separable.
      
      This shouldn't really change anything for our existing
      platforms, with one minor exception --- we should now call
      variadic ObjC methods with the ... in the "right place"
      (see the test case), which I guess matters for anyone
      running GNUStep on MIPS.  Mostly it's just a substantial
      clean-up.
      
      llvm-svn: 150788
      a729c62b
  14. Feb 16, 2012
  15. Feb 13, 2012
    • Richard Smith's avatar
      Deal with a horrible C++11 special case. If a non-literal type has a constexpr · 6331c408
      Richard Smith authored
      constructor, and that constructor is used to initialize an object of static
      storage duration such that all members and bases are initialized by constant
      expressions, constant initialization is performed. In this case, the object
      can still have a non-trivial destructor, and if it does, we must emit a dynamic
      initializer which performs no initialization and instead simply registers that
      destructor.
      
      llvm-svn: 150419
      6331c408
  16. Feb 07, 2012
  17. Feb 06, 2012
  18. Feb 05, 2012
  19. Feb 02, 2012
  20. Feb 01, 2012
    • Argyrios Kyrtzidis's avatar
      Revert r149363 which was part a series of commits that were reverted in llvm · a11b35a9
      Argyrios Kyrtzidis authored
      commit 149470. This fixes test/CodeGen/PR3589-freestanding-libcalls.c.
      
      Original log:
      
          ConstantArray::get() (for strings) is going away, use
          ConstantDataArray::getString instead.
      
          Many instances of ConstantArray::get() could be moved to
          use more efficient ConstantDataArray methods that avoid a ton
          of intermediate Constant*'s for each element (e.g.
          GetConstantArrayFromStringLiteral).  I don't plan on doing this
          in the short-term though.
      
      llvm-svn: 149477
      a11b35a9
  21. Jan 31, 2012
  22. Jan 24, 2012
    • Kostya Serebryany's avatar
      The following patch adds __attribute__((no_address_safety_analysis)) which will allow to disable · 588d6abf
      Kostya Serebryany authored
      address safety analysis (such as e.g. AddressSanitizer or SAFECode) for a specific function.
      
      When building with AddressSanitizer, add AddressSafety function attribute to every generated function
      except for those that have __attribute__((no_address_safety_analysis)).
      
      With this patch we will be able to
      1. disable AddressSanitizer for a particular function
      2. disable AddressSanitizer-hostile optimizations (such as some cases of load widening) when AddressSanitizer is on.
      
      llvm-svn: 148842
      588d6abf
  23. Jan 20, 2012
  24. Jan 18, 2012
  25. Jan 14, 2012
    • Douglas Gregor's avatar
      De-virtualize getPreviousDecl() and getMostRecentDecl() when we know · ec9fd13c
      Douglas Gregor authored
      we have a redeclarable type, and only use the new virtual versions
      (getPreviousDeclImpl() and getMostRecentDeclImpl()) when we don't have
      that type information. This keeps us from penalizing users with strict
      type information (and is the moral equivalent of a "final" method).
      
      Plus, settle on the names getPreviousDecl() and getMostRecentDecl()
      throughout.
      
      llvm-svn: 148187
      ec9fd13c
    • Richard Smith's avatar
      constexpr irgen: Add irgen support for APValue::Struct, APValue::Union, · dafff947
      Richard Smith authored
      APValue::Array and APValue::MemberPointer. All APValue values can now be emitted
      as constants.
      
      Add new CGCXXABI entry point for emitting an APValue MemberPointer. The other
      entrypoints dealing with constant member pointers are no longer necessary and
      will be removed in a later change.
      
      Switch codegen from using EvaluateAsRValue/EvaluateAsLValue to
      VarDecl::evaluateValue. This performs caching and deals with the nasty cases in
      C++11 where a non-const object's initializer can refer indirectly to
      previously-initialized fields within the same object.
      
      Building the intermediate APValue object incurs a measurable performance hit on
      pathological testcases with huge initializer lists, so we continue to build IR
      directly from the Expr nodes for array and record types outside of C++11.
      
      llvm-svn: 148178
      dafff947
  26. Jan 10, 2012
  27. Jan 01, 2012
  28. Dec 27, 2011
Loading