1. May 07, 2013
    • Enrico Granata's avatar
    • Howard Hinnant's avatar
      Expose accidentally removed __compressed_pair constructor taking... · eedfabd9
      Howard Hinnant authored
      Expose accidentally removed __compressed_pair constructor taking piecewise_construct_t.  This fixes http://llvm.org/bugs/show_bug.cgi?id=15918 .
      
      llvm-svn: 181217
      eedfabd9
    • Jean-Luc Duprat's avatar
      Provide InstCombines for the following 3 cases: · 3e4fc3ef
      Jean-Luc Duprat authored
      A * (1 - (uitofp i1 C)) -> select C, 0, A
      B * (uitofp i1 C) -> select C, B, 0
      select C, 0, A + select C, B, 0 -> select C, B, A
      
      These come up in code that has been hand-optimized from a select to a linear blend, 
      on platforms where that may have mattered. We want to undo such changes 
      with the following transform:
      A*(1 - uitofp i1 C) + B*(uitofp i1 C) -> select C, A, B
      
      llvm-svn: 181216
      3e4fc3ef
    • Tim Northover's avatar
      AArch64: use MCJIT by default and enable related tests. · 7dbbc28f
      Tim Northover authored
      This just enables some testing I'd missed after implementing MCJIT
      support.
      
      llvm-svn: 181215
      7dbbc28f
    • Jordan Rose's avatar
      [analyzer] Remove now-unused bindCompoundLiteral helper function. · 50e5db8a
      Jordan Rose authored
      The one user has been changed to use getLValue on the compound literal
      expression and then use the normal bindLoc to assign a value. No need
      to special case this in the StoreManager.
      
      llvm-svn: 181214
      50e5db8a
    • Jordan Rose's avatar
      [analyzer] Handle CXXTemporaryObjectExprs in compound literals. · 5d2abefb
      Jordan Rose authored
      This occurs because in C++11 the compound literal syntax can trigger a
      constructor call via list-initialization. That is, "Point{x, y}" and
      "(Point){x, y}" end up being equivalent. If this occurs, the inner
      CXXConstructExpr will have already handled the object construction; the
      CompoundLiteralExpr just needs to propagate that value forwards.
      
      <rdar://problem/13804098>
      
      llvm-svn: 181213
      5d2abefb
    • Jordan Rose's avatar
      Fix representation of compound literals for C++ objects with destructors. · 6c0505e4
      Jordan Rose authored
      Previously, this compound literal expression (a GNU extension in C++):
      
        (AggregateWithDtor){1, 2}
      
      resulted in this AST:
      
       `-CXXBindTemporaryExpr [...] 'struct Point' (CXXTemporary [...])
         `-CompoundLiteralExpr [...] 'struct AggregateWithDtor'
           `-CXXBindTemporaryExpr [...] 'struct AggregateWithDtor' (CXXTemporary [...])
             `-InitListExpr [...] 'struct AggregateWithDtor'
               |-IntegerLiteral [...] 'int' 1
               `-IntegerLiteral [...] 'int' 2
      
      Note the two CXXBindTemporaryExprs. The InitListExpr is really part of the
      CompoundLiteralExpr, not an object in its own right. By introducing a new
      entity initialization kind in Sema specifically for compound literals, we
      avoid the treatment of the inner InitListExpr as a temporary.
      
       `-CXXBindTemporaryExpr [...] 'struct Point' (CXXTemporary [...])
         `-CompoundLiteralExpr [...] 'struct AggregateWithDtor'
           `-InitListExpr [...] 'struct AggregateWithDtor'
             |-IntegerLiteral [...] 'int' 1
             `-IntegerLiteral [...] 'int' 2
      
      llvm-svn: 181212
      6c0505e4
    • Ulrich Weigand's avatar
      · 47445073
      Ulrich Weigand authored
      Add SystemZ support
      
      This patch then adds all the usual platform-specific pieces for SystemZ:
      driver support, basic target info, register names and constraints,
      ABI info and vararg support.  It also adds new tests to verify pre-defined
      macros and inline asm, and updates a test for the minimum alignment change.
      
      This version of the patch incorporates feedback from reviews by
      Eric Christopher and John McCall.  Thanks to all reviewers!
      
      Patch by Richard Sandiford.
      
      llvm-svn: 181211
      47445073
    • Ulrich Weigand's avatar
      · fa806422
      Ulrich Weigand authored
      Allow targets to define minimum alignment for global variables
      
      This patch adds a new common code feature that allows platform code to
      request minimum alignment of global symbols.  The background for this is
      that on SystemZ, the most efficient way to load addresses of global symbol
      is the LOAD ADDRESS RELATIVE LONG (LARL) instruction.  This instruction
      provides PC-relative addressing, but only to *even* addresses.  For this
      reason, existing compilers will guarantee that global symbols are always
      aligned to at least 2.  [ Since symbols would otherwise already use a
      default alignment based on their type, this will usually only affect global
      objects of character type or character arrays. ]  GCC also allows creating
      symbols without that extra alignment by using explicit "aligned" attributes
      (which then need to be used on both definition and each use of the symbol).
      
      To enable support for this with Clang, this patch adds a
      TargetInfo::MinGlobalAlign variable that provides a global minimum for the
      alignment of every global object (unless overridden via explicit alignment
      attribute), and adds code to respect this setting.  Within this patch, no
      platform actually sets the value to anything but the default 1, resulting
      in no change in behaviour on any existing target.
      
      This version of the patch incorporates feedback from reviews by
      Eric Christopher and John McCall.  Thanks to all reviewers!
      
      Patch by Richard Sandiford.
      
      llvm-svn: 181210
      fa806422
    • Ulrich Weigand's avatar
      · 92b2085c
      Ulrich Weigand authored
      [SystemZ] Add to --enable-targets=all
      
      This patch finally enables the SystemZ target in the default build
      (with --enable-targets=all).
      
      Patch by Richard Sandiford.
      
      llvm-svn: 181209
      92b2085c
    • Ulrich Weigand's avatar
      · 1ceebf6e
      Ulrich Weigand authored
      [SystemZ] Add configure bits
      
      This patch wires up the SystemZ target in configure, so that it can now be
      built using --enable-targets=systemz.   It is not yet included in the default
      build (--enable-targets=all); this will be done by a follow-up patch.
      
      Patch by Richard Sandiford.
      
      llvm-svn: 181208
      1ceebf6e
    • Ulrich Weigand's avatar
      · 80435baa
      Ulrich Weigand authored
      [SystemZ] Set up JIT/MCJIT test cases
      
      This patch adds the necessary configuration bits and #ifdef's to set up
      the JIT/MCJIT test cases for SystemZ.  Like other recent targets, we do
      fully support MCJIT, but do not support the old JIT at all.  Set up the
      lit config files accordingly, and disable old-JIT unit tests.
      
      Patch by Richard Sandiford.
      
      llvm-svn: 181207
      80435baa
    • Ulrich Weigand's avatar
      · 982a2151
      Ulrich Weigand authored
      [SystemZ] Add MC test cases
      
      This adds all MC tests for the SystemZ target.
      
      Patch by Richard Sandiford.
      
      llvm-svn: 181206
      982a2151
    • Ulrich Weigand's avatar
      · 08bd6154
      Ulrich Weigand authored
      [SystemZ] Add DebugInfo test cases
      
      This adds all DebugInfo tests for the SystemZ target.
      
      This version of the patch incorporates feedback from reviews by
      Eric Christopher and Rafael Espindola.  Thanks to all reviewers!
      
      Patch by Richard Sandiford.
      
      llvm-svn: 181205
      08bd6154
    • Ulrich Weigand's avatar
      · 9e3577ff
      Ulrich Weigand authored
      [SystemZ] Add CodeGen test cases
      
      This adds all CodeGen tests for the SystemZ target.
      
      This version of the patch incorporates feedback from a review by
      Sean Silva.  Thanks to all reviewers!
      
      Patch by Richard Sandiford.
      
      llvm-svn: 181204
      9e3577ff
    • Ulrich Weigand's avatar
      · 5f613dfd
      Ulrich Weigand authored
      [SystemZ] Add back end
      
      This adds the actual lib/Target/SystemZ target files necessary to
      implement the SystemZ target.  Note that at this point, the target
      cannot yet be built since the configure bits are missing.  Those
      will be provided shortly by a follow-on patch.
      
      This version of the patch incorporates feedback from reviews by
      Chris Lattner and Anton Korobeynikov.  Thanks to all reviewers!
      
      Patch by Richard Sandiford.
      
      llvm-svn: 181203
      5f613dfd
    • Tom Stellard's avatar
      R600: Update GPU variants in -mcpu option · b38600c4
      Tom Stellard authored
      We've added the RS880 variant in the LLVM backend to represent an R600
      GPU with no vertex cache, so we need to update the GPU mappings for
      -mcpu.
      
      llvm-svn: 181202
      b38600c4
    • Ulrich Weigand's avatar
      · 0213e7fc
      Ulrich Weigand authored
      [SystemZ] Define DWARF encoding
      
      This is another patch in preparation for adding the SystemZ target.
      It defines the appropriate values for DWARF encodings; the intent
      is to be compatible with what GCC currently does on the target.
      
      Patch by Richard Sandiford.
      
      llvm-svn: 181201
      0213e7fc
    • Ulrich Weigand's avatar
      · f1c30045
      Ulrich Weigand authored
      Simplify JIT unit test #ifdefs
      
      Several platforms need to disable all old-JIT unit tests, since they only
      support the new MCJIT.  This currently done via #ifdef'ing out those tests
      in the ExecutionEngine/JIT/*.cpp files.  As those #ifdef's have grown
      historically, we now have a number of repeated directives which -in total-
      cover nearly the whole file, but leave a couple of helper functions out.
      When building the tests with clang itself, those helper functions now
      cause spurious "unused function" warnings.
      
      To fix those warnings, and also to remove the duplicate #ifdef conditions
      and make it easier to disable the tests for a new target, this patch
      consolidates the #ifdefs into a single one per file, which covers all
      the tests including all helper routines.
      
      Tested on PowerPC and SystemZ.
      
      llvm-svn: 181200
      f1c30045
  2. May 06, 2013