1. Apr 03, 2015
    • Zachary Turner's avatar
      Fix error resulting from llvm r233938. · d4e1b868
      Zachary Turner authored
      llvm-svn: 233942
      d4e1b868
    • Sanjay Patel's avatar
      [AVX] Improve insertion of i8 or i16 into low element of 256-bit zero vector · eca590ff
      Sanjay Patel authored
      Without this patch, we split the 256-bit vector into halves and produced something like:
      	movzwl	(%rdi), %eax
      	vmovd	%eax, %xmm0
      	vxorps	%xmm1, %xmm1, %xmm1
      	vblendps	$15, %ymm0, %ymm1, %ymm0 ## ymm0 = ymm0[0,1,2,3],ymm1[4,5,6,7]
      
      Now, we eliminate the xor and blend because those zeros are free with the vmovd:
              movzwl  (%rdi), %eax
              vmovd   %eax, %xmm0
      
      This should be the final fix needed to resolve PR22685:
      https://llvm.org/bugs/show_bug.cgi?id=22685
      
      llvm-svn: 233941
      eca590ff
    • Greg Clayton's avatar
      Don't return a reference to a temp variable. · ff0cf4f5
      Greg Clayton authored
      llvm-svn: 233940
      ff0cf4f5
    • David Blaikie's avatar
      [opaque pointer type] API migration for GEP constant factories · 4a2e73b0
      David Blaikie authored
      Require the pointee type to be passed explicitly and assert that it is
      correct. For now it's possible to pass nullptr here (and I've done so in
      a few places in this patch) but eventually that will be disallowed once
      all clients have been updated or removed. It'll be a long road to get
      all the way there... but if you have the cahnce to update your callers
      to pass the type explicitly without depending on a pointer's element
      type, that would be a good thing to do soon and a necessary thing to do
      eventually.
      
      llvm-svn: 233938
      4a2e73b0
    • David Blaikie's avatar
      [opaque pointer type] Update for GEP API changes in LLVM · e3b172af
      David Blaikie authored
      Now the GEP constant utility functions require the type to be explicitly
      passed (since eventually the pointer type will be opaque and not convey
      the required type information). For now callers can still pass nullptr
      (though none were needed here in Clang, which is nice) if
      convenienc/necessary, but eventually that will be disallowed as well.
      
      llvm-svn: 233937
      e3b172af
    • Quentin Colombet's avatar
      [AArch64] Add a comment to make it explicit why we increased the complexity. · a64723c2
      Quentin Colombet authored
      Follow-up of r233653.
      
      llvm-svn: 233936
      a64723c2
    • Greg Clayton's avatar
      Fix a crasher that could happen when you run LLDB and evaluate an expression... · c00ca313
      Greg Clayton authored
      Fix a crasher that could happen when you run LLDB and evaluate an expression where the objective C runtime registers a helper function, and also have an Objective C or C++ exception breakpoint. When shutting down the process in Process::Finalize() we clear a STL collection class and that causes objects to be destroyed that could re-enter Process and cause it to try to iterate over that same collection class that is being destroyed.
      
      Guard against this by setting a new "m_finalizing" flag that lets us know we are in the process of finalizing.
      
      <rdar://problem/20369152>
      
      llvm-svn: 233935
      c00ca313
    • Greg Clayton's avatar
      Fix a few more test suite errors where a cleanup lambda was calling... · b0a650ac
      Greg Clayton authored
      Fix a few more test suite errors where a cleanup lambda was calling self.runCmd() which requires the command returns successfully. Using self.dbg.HandleCommand() doesn't require success.
      
      llvm-svn: 233934
      b0a650ac
    • Greg Clayton's avatar
      Many many test failures after some recent changes. The problem is... · e0d0a765
      Greg Clayton authored
      Many many test failures after some recent changes. The problem is lldbtest.getPlatform() returns the "OS" of the selected platform's triple. This is "macosx" for desktop macosx and "ios" for iOS. It used to be "darwin". 
      
      There was a lot of code that was checking "if self.getPlatform() == 'darwin'" which is not correct. I fixed this by adding a:
      
      lldbtest.platformIsDarwin()
      
      which returns true if the current platform's OS is "macosx", "ios" or "darwin". These three valid darwin are now returned by a static function:
      
      lldbtest.getDarwinOSTriples()
      
      Fixed up all places that has 'if self.getPlatform() == "darwin":' with "if self.platformIsDarwin()" and all instances of 'if self.getPlatform() != "darwin":' with "if not self.platformIsDarwin()". I also fixed some darwin decorator functions to do the right thing as well.
      
      llvm-svn: 233933
      e0d0a765
    • Reid Kleckner's avatar
      [AST] Shrink the Stmt hierarchy with LLVM_PTR_SIZE for MSVC 2013 · a5cad0d6
      Reid Kleckner authored
      Follow-up to r233921 that removes the 'void *Aligner' Stmt union member
      for MSVC 2013.
      
      llvm-svn: 233932
      a5cad0d6
    • Sanjay Patel's avatar
      [X86, AVX] adjust tablegen patterns to generate better code for scalar... · 2bb5d695
      Sanjay Patel authored
      [X86, AVX] adjust tablegen patterns to generate better code for scalar insertion into zero vector (PR23073)
      
      For code like this:
      
      define <8 x i32> @load_v8i32() {
        ret <8 x i32> <i32 7, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0>
      }
      
      We produce this AVX code:
      
      _load_v8i32:                            ## @load_v8i32
        movl	$7, %eax
        vmovd	%eax, %xmm0
        vxorps	%ymm1, %ymm1, %ymm1
        vblendps	$1, %ymm0, %ymm1, %ymm0 ## ymm0 = ymm0[0],ymm1[1,2,3,4,5,6,7]
        retq
      
      There are at least 2 bugs in play here:
      
          We're generating a blend when a move scalar does the same job using 2 less instruction bytes (see FIXMEs).
          We're not matching an existing pattern that would eliminate the xor and blend entirely. The zero bytes are free with vmovd.
      
      The 2nd fix involves an adjustment of "AddedComplexity" [1] and mostly masks the 1st problem.
      
      [1] AddedComplexity has close to no documentation in the source. 
      The best we have is this comment: "roughly corresponds to the number of nodes that are covered". 
      It appears that x86 has bastardized this definition by inflating its values for some other
      undocumented reason. For example, we have a pattern with "AddedComplexity = 400" (!). 
      
      I searched my way to this page:
      https://groups.google.com/forum/#!topic/llvm-dev/5UX-Og9M0xQ
      
      Differential Revision: http://reviews.llvm.org/D8794
      
      llvm-svn: 233931
      2bb5d695
    • Adam Nemet's avatar
      90fec840
    • Reid Kleckner's avatar
      Add an LLVM_PTR_SIZE macro to make LLVM_ALIGNAS more useful · f1a6414b
      Reid Kleckner authored
      MSVC 2013 requires the argument to __declspec(align()) to be an integer
      constant expression that doesn't involve any identifiers like sizeof.
      
      For GCC and Clang, LLVM_PTR_SIZE is equivalent to __SIZEOF_POINTER__,
      which dates back to GCC 4.6 and Clang 2010. If that's not available, we
      get sizeof(void*), which works with alignas() and
      __attribute__((aligned())).
      
      For MSVC, LLVM_PTR_SIZE is 4 or 8 depending on _WIN64.
      
      llvm-svn: 233929
      f1a6414b
    • Tom Stellard's avatar
      Implement atanpi builtin · 03dc366e
      Tom Stellard authored
      This implementation was ported from the AMD builtin library
      and has been tested with piglit, OpenCV, and the ocl conformance tests.
      
      llvm-svn: 233928
      03dc366e
    • Tom Stellard's avatar
      Implement asinpi builtin · eea09975
      Tom Stellard authored
      This implementation was ported from the AMD builtin library
      and has been tested with piglit, OpenCV, and the ocl conformance tests.
      
      llvm-svn: 233927
      eea09975
    • Tom Stellard's avatar
      Implement asinh builtin · 2b4ef39b
      Tom Stellard authored
      This implementation was ported from the AMD builtin library
      and has been tested with piglit, OpenCV, and the ocl conformance tests.
      
      llvm-svn: 233926
      2b4ef39b
    • Tom Stellard's avatar
      Implement acospi builtin · 084124a8
      Tom Stellard authored
      This implementation was ported from the AMD builtin library
      and has been tested with piglit, OpenCV, and the ocl conformance tests.
      
      llvm-svn: 233925
      084124a8
    • Simon Atanasyan's avatar
      [Mips] Inline the MipsELFWriter::hasGlobalGOTEntry function · 8189ee9a
      Simon Atanasyan authored
      No functional changes.
      
      llvm-svn: 233924
      8189ee9a
    • Benjamin Kramer's avatar
      Lower the default alignment on ASTContext's operator new. · 8adeef96
      Benjamin Kramer authored
      It was documented as 8 and operator new[] defaults to 8, but the normal
      operator new was never updated and happily wasted bytes on every other
      allocation.
      
      We still have to allocate all Types with 16 byte alignment, update the
      allocation calls for Types that were missing explicit alignment.
      
      llvm-svn: 233922
      8adeef96
  2. Apr 02, 2015