1. Jun 10, 2014
    • Richard Trieu's avatar
      Removing an "if (!this)" check from two print methods. The condition will · a23043cb
      Richard Trieu authored
      never be true in a well-defined context.  The checking for null pointers
      has been moved into the caller logic so it does not rely on undefined behavior.
      
      llvm-svn: 210497
      a23043cb
    • Alp Toker's avatar
      Reduce verbiage of lit.local.cfg files · d3d017cf
      Alp Toker authored
      We can just split targets_to_build in one place and make it immutable.
      
      llvm-svn: 210496
      d3d017cf
    • David Blaikie's avatar
      SmallVector: support resize(N) with move-only types · 669fc86e
      David Blaikie authored
      Unfortunately there's no way to elegantly do this with pre-canned
      algorithms. Using a generating iterator doesn't work because you default
      construct for each element, then move construct into the actual slot
      (bad for copy but non-movable types, and a little unneeded overhead even
      in the move-only case), so just write it out manually.
      
      This solution isn't exception safe (if one of the element's ctors calls
      we don't fall back, destroy the constructed elements, and throw on -
      which std::uninitialized_fill does do) but SmallVector (and LLVM) isn't
      exception safe anyway.
      
      llvm-svn: 210495
      669fc86e
    • Alexey Samsonov's avatar
      [TSan] Exclude blacklist tests from manual test runner · f0d1fd6b
      Alexey Samsonov authored
      llvm-svn: 210494
      f0d1fd6b
    • Bill Schmidt's avatar
      [PPC64LE] Generate correct code for unaligned little-endian vector loads · 6b5a7dfc
      Bill Schmidt authored
      The code in PPCTargetLowering::PerformDAGCombine() that handles
      unaligned Altivec vector loads generates a lvsl followed by a vperm.
      As we've seen in numerous other places, the vperm instruction has a
      big-endian bias, and this is fixed for little endian by complementing
      the permute control vector and swapping the input operands.  In this
      case the lvsl is providing the permute control vector.  Rather than
      generating an lvsl and a complement operation, it is sufficient to
      generate an lvsr instruction instead.  Thus for LE code generation we
      will generate an lvsr rather than an lvsl, and swap the other input
      arguments on the vperm.
      
      The existing test/CodeGen/PowerPC/vec_misalign.ll is updated to test
      the code generation for PPC64 and PPC64LE, in addition to the existing
      PPC32/G5 testing.
      
      llvm-svn: 210493
      6b5a7dfc
    • Alexey Samsonov's avatar
      Generate better location ranges for some register-described variables. · 8000e273
      Alexey Samsonov authored
      Don't terminate location ranges for register-described variables
      at the end of machine basic block if this register is never modified
      in the function body, except for the prologue and epilogue. Prologue
      location is guessed by FrameSetup flags on MachineInstructions, while
      epilogue location is deduced from debug locations of instructions
      in the basic blocks ending with return instructions.
      
      This patch is mostly targeted to fix non-trivial debug locations for
      variables addressed via stack and frame pointers.
      
      It is not really a generic fix. We can still produce poor debug info
      for register-described variables if this register *is* modified somewhere
      in the function, but in unrelated places. This might be the case for the debug
      info in optimized binaries (e.g. for local variables in inlined functions).
      LiveDebugVariables pass in CodeGen attempts to fix this problem by adjusting
      DBG_VALUE instructions, but this pass is tied to greedy register allocator,
      which is used in optimized builds only. Proper fix would likely involve
      generalizing LiveDebugVariables to all register allocators. See more discussion
      in http://reviews.llvm.org/D3933 review thread.
      
      I'm proceeding with this patch to fix immediate severe problems and
      important cases, e.g. fix completely broken debug info with AddressSanitizer
      and fix PR19307 (missing debug info for by-value std::string arguments).
      
      llvm-svn: 210492
      8000e273
    • Fariborz Jahanian's avatar
      Objective-C. Consider block pointer as NSObject as well as conforming to · 7ea91b28
      Fariborz Jahanian authored
      'NSCopying' protocol when diagnosing block to ObjC pointer conversion.
      // rdar://16739120
      
      llvm-svn: 210491
      7ea91b28
    • Rafael Espindola's avatar
      Update langref for unnamed_addr being allowed in aliases. · 28f3ca66
      Rafael Espindola authored
      Thanks to Duncan P. N. Exon Smith and Owen Anderson for noticing.
      
      llvm-svn: 210490
      28f3ca66
    • Saleem Abdulrasool's avatar
      ARM: add VLA extension for WoA Itanium ABI · abac6e92
      Saleem Abdulrasool authored
      The armv7-windows-itanium environment is nearly identical to the MSVC ABI. It
      has a few divergences, mostly revolving around the use of the Itanium ABI for
      C++. VLA support is one of the extensions that are amongst the set of the
      extensions.
      
      This adds support for proper VLA emission for this environment. This is
      somewhat similar to the handling for __chkstk emission on X86 and the large
      stack frame emission for ARM. The invocation style for chkstk is still
      controlled via the -mcmodel flag to clang.
      
      Make an explicit note that this is an extension.
      
      llvm-svn: 210489
      abac6e92
    • Matt Arsenault's avatar
      Look through addrspacecasts when turning ptr comparisons into · 44f60d0a
      Matt Arsenault authored
      index comparisons.
      
      llvm-svn: 210488
      44f60d0a
    • Alp Toker's avatar
      Disallow multiple inclusion of clang/Config/config.h · 9ea60874
      Alp Toker authored
      Internal config.h headers are only meant to be included from the main file.
      
      llvm-svn: 210487
      9ea60874
    • Stepan Dyatkovskiy's avatar
      Added functions cross-reference test. · 297c8263
      Stepan Dyatkovskiy authored
      Originally this similar was initiated by Björn Steinbrink here:
      http://reviews.llvm.org/D3437
      
      Bug itself has been fixed by principal changes in MergeFunctions. Though
      special checks for functions merging are still actual. And the test has
      been accepted with slight modifications.
      
      llvm-svn: 210486
      297c8263
    • Alp Toker's avatar
      Remove old fenv.h workaround for a historic clang driver bug · 51420a8d
      Alp Toker authored
      Tested and works fine with clang using libstdc++.
      
      All indications are that this was fixed some time ago and isn't a problem with
      any clang version we support.
      
      I've added a note in PR6907 which is still open for some reason.
      
      llvm-svn: 210485
      51420a8d
    • Hans Wennborg's avatar
      Allow definition of dllimport static fields in partial specializations (PR19956) · cd95922b
      Hans Wennborg authored
      This expands the logic from r210141 to cover partial specializations too.
      
      llvm-svn: 210484
      cd95922b
    • Alp Toker's avatar
      Fold FEnv.h into the implementation · c817d6a5
      Alp Toker authored
      Support headers shouldn't use config.h definitions, and they should never be
      undefined like this.
      
      ConstantFolding.cpp was the only user of this facility and already includes
      config.h for other math features, so it makes sense to move the checks there at
      point of use.
      
      (The implicit config.h was also quite dangerous -- removing the FEnv.h include
      would have silently disabled math constant folding without causing any tests to
      fail. Need to investigate -Wundef once the cleanup is done.)
      
      This eliminates the last config.h include from LLVM headers, paving the way for
      more consistent configuration checks.
      
      llvm-svn: 210483
      c817d6a5
    • Peter Zotov's avatar
      [OCaml] Add more Llvm_target tests · a8de0de1
      Peter Zotov authored
      Patch by Jacques-Pascal Deplaix
      
      llvm-svn: 210482
      a8de0de1
    • Todd Fiala's avatar
      Added gdb-remote test for s packet, single stepping. · 697bff9c
      Todd Fiala authored
      llvm-svn: 210481
      697bff9c
    • Peter Zotov's avatar
      [OCaml] Unbreak Llvm_target.TargetMachine.set_verbose_asm · 2b5a0479
      Peter Zotov authored
      Patch by Jacques-Pascal Deplaix
      
      llvm-svn: 210480
      2b5a0479
    • Eric Christopher's avatar
      Move all of the x86 subtarget initialized variables down into the x86 subtarget · a08f30bd
      Eric Christopher authored
      from the x86 target machine. Should be no functional change.
      
      llvm-svn: 210479
      a08f30bd
    • Matt Arsenault's avatar
      R600/SI: Rename VOP3 helper class to be more general · 93840c09
      Matt Arsenault authored
      It has other uses besides shift instructions.
      
      llvm-svn: 210478
      93840c09
    • Andrea Di Biagio's avatar
      [X86] Add target combine rules for horizontal add/sub. · f99dd64f
      Andrea Di Biagio authored
      This patch adds new target specific combine rules to identify horizontal
      add/sub idioms from BUILD_VECTOR dag nodes.
      
      This patch also teaches the DAGCombiner how to canonicalize sequences of
      insert_vector_elt dag nodes according to the following rule:
      
        (insert_vector_elt (insert_vector_elt A, I0), I1) ->
          (insert_vecto_elt (insert_vector_elt A, I1), I0)
      
      This new canonicalization rule only triggers if the inner insert_vector
      dag node has exactly one use; also, both indices must be known constants,
      and I1 < I0.
      This last rule made it possible to write a simpler algorithm to identify
      horizontal add/sub patterns because now we don't have to worry about the
      ordering of insert_vector_elt dag nodes.
      
      llvm-svn: 210477
      f99dd64f
    • Matt Arsenault's avatar
      R600/SI: Keep 64-bit not on SALU · 689f3250
      Matt Arsenault authored
      llvm-svn: 210476
      689f3250
    • Matt Arsenault's avatar
      R600: Fix selection failure for vector bswap · 13ccc8f1
      Matt Arsenault authored
      llvm-svn: 210475
      13ccc8f1
    • Bill Schmidt's avatar
      [PPC64LE] Generate correct little-endian code for v16i8 multiply · 42995e8c
      Bill Schmidt authored
      The existing code in PPCTargetLowering::LowerMUL() for multiplying two
      v16i8 values assumes that vector elements are numbered in big-endian
      order.  For little-endian targets, the vector element numbering is
      reversed, but the vmuleub, vmuloub, and vperm instructions still
      assume big-endian numbering.  To account for this, we must adjust the
      permute control vector and reverse the order of the input registers on
      the vperm instruction.
      
      The existing test/CodeGen/PowerPC/vec_mul.ll is updated to be executed
      on powerpc64 and powerpc64le targets as well as the original powerpc
      (32-bit) target.
      
      llvm-svn: 210474
      42995e8c
  2. Jun 09, 2014