and though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here

  1. 19 Jan, 2016 7 commits
    • Hans Wennborg's avatar
      Merging r257896: · ddf8fb44
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r257896 | nico | 2016-01-15 07:44:14 -0800 (Fri, 15 Jan 2016) | 1 line
      
      Revert r256322 (and follow-up 256323), the test it added does not pass on OS X.
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 258186
      ddf8fb44
    • Hans Wennborg's avatar
      Merging r257875: · dc41288a
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r257875 | jamesm | 2016-01-15 01:20:19 -0800 (Fri, 15 Jan 2016) | 11 lines
      
      [InstCombine] Rewrite bswap/bitreverse handling completely.
      
      There are several requirements that ended up with this design;
        1. Matching bitreversals is too heavyweight for InstCombine and doesn't really need to be done so early.
        2. Bitreversals and byteswaps are very related in their matching logic.
        3. We want to implement support for matching more advanced bswap/bitreverse patterns like partial bswaps/bitreverses.
        4. Bswaps are best matched early in InstCombine.
      
      The result of these is that a new utility function is created in Transforms/Utils/Local.h that can be configured to search for bswaps, bitreverses or both. InstCombine uses it to find only bswaps, CGP uses it to find only bitreversals.
      
      We can then extend the matching logic in one place only.
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 258180
      dc41288a
    • Hans Wennborg's avatar
      Merging r258169: · 2302855e
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r258169 | hans | 2016-01-19 11:26:43 -0800 (Tue, 19 Jan 2016) | 4 lines
      
      lit.cfg: Pass -isysroot to the SDK on Darwin
      
      Newly-built Clangs don't automatically find the SDK, and newer versions
      of Mac OS X don't provide it under /usr/include etc.
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 258171
      2302855e
    • Hans Wennborg's avatar
      Merging r258168: · f6eda69b
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r258168 | hans | 2016-01-19 11:21:58 -0800 (Tue, 19 Jan 2016) | 3 lines
      
      test-release.sh: Use CMake also for Darwin
      
      This didn't work for 3.7, but hopefully it should work now.
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 258170
      f6eda69b
    • Hans Wennborg's avatar
      Merging r257925, r257929, r257930, and r257997: · 89010f1c
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r257925 | mren | 2016-01-15 11:35:42 -0800 (Fri, 15 Jan 2016) | 10 lines
      
      CXX_FAST_TLS calling convention: fix issue on X86-64.
      
      When we have a single basic block, the explicit copy-back instructions should
      be inserted right before the terminator. Before this fix, they were wrongly
      placed at the beginning of the basic block.
      
      I will commit fixes to other platforms as well.
      
      PR26136
      ```
      
      ---------------------------------------------------------------------
      
      ------------------------------------------------------------------------
      r257929 | mren | 2016-01-15 12:13:28 -0800 (Fri, 15 Jan 2016) | 10 lines
      
      CXX_FAST_TLS calling convention: fix issue on AArch64.
      
      When we have a single basic block, the explicit copy-back instructions should
      be inserted right before the terminator. Before this fix, they were wrongly
      placed at the beginning of the basic block.
      
      I will commit fixes to other platforms as well.
      
      PR26136
      ------------------------------------------------------------------------
      
      ------------------------------------------------------------------------
      r257930 | mren | 2016-01-15 12:24:11 -0800 (Fri, 15 Jan 2016) | 8 lines
      
      CXX_FAST_TLS calling convention: fix issue on ARM.
      
      When we have a single basic block, the explicit copy-back instructions should
      be inserted right before the terminator. Before this fix, they were wrongly
      placed at the beginning of the basic block.
      
      PR26136
      ------------------------------------------------------------------------
      
      ------------------------------------------------------------------------
      r257997 | mren | 2016-01-16 08:39:46 -0800 (Sat, 16 Jan 2016) | 12 lines
      
      CXX_FAST_TLS calling convention: fix issue on x86-64.
      
      %RBP can't be handled explicitly. We generate the following code:
          pushq %rbp
          movq  %rsp, %rbp
          ...
          movq  %rbx, (%rbp)  ## 8-byte Spill
      where %rbp will be overwritten by the spilled value.
      
      The fix is to let PEI handle %RBP.
      PR26136
      ------------------------------------------------------------------------
      
      llvm-svn: 258162
      89010f1c
    • Hans Wennborg's avatar
      Merging r257902 (and r257775) · bf4a0e1f
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r257775 | jyknight | 2016-01-14 08:33:21 -0800 (Thu, 14 Jan 2016) | 3 lines
      
      Revert "Stop increasing alignment of externally-visible globals on ELF platforms."
      
      This reverts commit r257719, due to PR26144.
      ```
      
      ---------------------------------------------------------------------
      
      ------------------------------------------------------------------------
      r257902 | jyknight | 2016-01-15 08:33:06 -0800 (Fri, 15 Jan 2016) | 17 lines
      
      Stop increasing alignment of externally-visible globals on ELF
      platforms.
      
      With ELF, the alignment of a global variable in a shared library will
      get copied into an executables linked against it, if the executable even
      accesss the variable. So, it's not possible to implicitly increase
      alignment based on access patterns, or you'll break existing binaries.
      
      This happened to affect libc++'s std::cout symbol, for example. See
      thread: http://thread.gmane.org/gmane.comp.compilers.clang.devel/45311
      
      (This is a re-commit of r257719, without the bug reported in
      PR26144. I've tweaked the code to not assert-fail in
      enforceKnownAlignment when computeKnownBits doesn't recurse far enough
      to find the underlying Alloca/GlobalObject value.)
      
      Differential Revision: http://reviews.llvm.org/D16145
      ------------------------------------------------------------------------
      
      llvm-svn: 258155
      bf4a0e1f
    • Hans Wennborg's avatar
      Merging r257905: · 9705d060
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r257905 | hans | 2016-01-15 09:04:45 -0800 (Fri, 15 Jan 2016) | 3 lines
      
      test-release.sh: Fix clang-tools-extra symlink for CMake build
      
      The CMake and Autoconf builds want the symlink set up differently.
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 258146
      9705d060
  2. 14 Jan, 2016 6 commits
    • Hans Wennborg's avatar
      Merging r257791: · d1d2746d
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r257791 | hans | 2016-01-14 11:21:14 -0800 (Thu, 14 Jan 2016) | 4 lines
      
      Exclude test-suite from CMake builds in test-release.sh
      
      It's broken. In 3.7 there wasn't a CMake build for test-suite at all,
      so we're not losing something we had before.
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 257836
      d1d2746d
    • Hans Wennborg's avatar
      Merging r257833: · 9c6e91b5
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r257833 | hans | 2016-01-14 15:18:20 -0800 (Thu, 14 Jan 2016) | 11 lines
      
      Don't use __DATE__ or __TIME__; it breaks release builds (PR26145)
      
      The release builds are configured to be reproducible, so that the
      binaries compare equal between bootstrap iterations. The OpenMP
      run-time build was failing like this:
      
      runtime/src/kmp_version.c:108:79: error: expansion of date or time macro is not reproducible [-Werror,-Wdate-time]
      char const __kmp_version_build_time[]     = KMP_VERSION_PREFIX "build time: " __DATE__ " " __TIME__;
      
      Figuring as the build currently doesn't set LIBOMP_DATE, it's probably
      OK to skip setting the build time here too.
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 257834
      9c6e91b5
    • Hans Wennborg's avatar
      Merging r257730: · 0e2f0d7a
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r257730 | majnemer | 2016-01-13 17:20:03 -0800 (Wed, 13 Jan 2016) | 11 lines
      
      [X86] Don't alter HasOpaqueSPAdjustment after we've relied on it
      
      We rely on HasOpaqueSPAdjustment not changing after we've calculated
      things based on it.  Things like whether or not we can use 'rep;movs' to
      copy bytes around, that sort of thing.  If it changes, invariants in the
      backend will quietly break.  This situation arose when we had a call to
      memcpy *and* a COPY of the FLAGS register where we would attempt to
      reference local variables using %esi, a register that was clobbered by
      the 'rep;movs'.
      
      This fixes PR26124.
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 257779
      0e2f0d7a
    • Hans Wennborg's avatar
      ReleaseNotes.rst: a few entries from Rafael · 46669202
      Hans Wennborg authored
      llvm-svn: 257725
      46669202
    • Hans Wennborg's avatar
      Merging r257702: · db9ae51b
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r257702 | marshall | 2016-01-13 15:05:15 -0800 (Wed, 13 Jan 2016) | 1 line
      
      Better comments in test. NFC
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 257721
      db9ae51b
    • Hans Wennborg's avatar
      Merging r257696: · 8eb07d5f
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r257696 | marshall | 2016-01-13 14:52:36 -0800 (Wed, 13 Jan 2016) | 1 line
      
      Fix test for C++03 - lacking noexcept
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 257720
      8eb07d5f
  3. 13 Jan, 2016 27 commits
    • Hans Wennborg's avatar
      Merging r257682: · dab2ebfd
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r257682 | marshall | 2016-01-13 13:54:34 -0800 (Wed, 13 Jan 2016) | 1 line
      
      Fix PR#25973 : 'basic_string::assign(InputIt, InputIt) doesn't provide the strong exception safety guarantee'. This turned out to be a pervasive problem in <string>, which required a fair amount of rework. Add in an optimization for when iterators provide noexcept increment/comparison/assignment/dereference (which covers many of the iterators in libc++). Reviewed as http://reviews.llvm.org/D15862
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 257716
      dab2ebfd
    • Hans Wennborg's avatar
      Merging r257652 and r257695: · a50fe46c
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r257652 | hans | 2016-01-13 11:14:03 -0800 (Wed, 13 Jan 2016) | 1 line
      
      Update cxx_dr_status.html after the 3.8 branch
      ```
      
      ---------------------------------------------------------------------
      
      ------------------------------------------------------------------------
      r257695 | rsmith | 2016-01-13 14:51:59 -0800 (Wed, 13 Jan 2016) | 2 lines
      
      Update make_cxx_dr_status after the 3.8 branch.
      
      ------------------------------------------------------------------------
      
      llvm-svn: 257714
      a50fe46c
    • Hans Wennborg's avatar
      Merging r257692: · 65a604df
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r257692 | hans | 2016-01-13 14:40:26 -0800 (Wed, 13 Jan 2016) | 7 lines
      
      Fix -Wformat-pedantic warning
      
      /work/llvm-3.8/llvm.src/tools/lldb/source/API/SBProcess.cpp:1003:73:
      error: format specifies type 'void *' but the argument has type 'lldb_private::Event *' [-Werror,-Wformat-pedantic]
              log->Printf ("SBProcess::%s (event.sp=%p) => %d", __FUNCTION__, event.get(), ret_val);
                                                    ~~                        ^~~~~~~~~~~
      1 error generated.
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 257706
      65a604df
    • Hans Wennborg's avatar
      Merging r257691: · 16be966e
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r257691 | hans | 2016-01-13 14:40:24 -0800 (Wed, 13 Jan 2016) | 15 lines
      
      Include IR/DerivedTypes.h instead of IR/Type.h to match LLVM change r256406.
      
      This is similar to r256407 and fixes the following warning:
      
      In file included from /work/llvm-3.8/llvm.src/tools/lldb/source/Target/ThreadPlanCallFunctionUsingABI.cpp:14:
      In file included from /work/llvm-3.8/llvm.src/tools/lldb/include/lldb/Target/ThreadPlanCallFunctionUsingABI.h:23:
      /work/llvm-3.8/llvm.src/include/llvm/IR/Type.h:350:16: error: inline function 'llvm::Type::getSequentialElementType' is not defined [-Werror,-Wundefined-inline]
        inline Type *getSequentialElementType() const;
                     ^
      /work/llvm-3.8/llvm.src/include/llvm/IR/Type.h:353:46: note: used here
        Type *getArrayElementType() const { return getSequentialElementType(); }
                                                   ^
      1 error generated.
      
      I'm not sure why it's not showing on any bots.
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 257704
      16be966e
    • Hans Wennborg's avatar
      Merging r257648: · 825586db
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r257648 | hans | 2016-01-13 10:59:45 -0800 (Wed, 13 Jan 2016) | 1 line
      
      Fix struct/class mismatch for MachineSchedContext
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 257668
      825586db
    • Dimitry Andric's avatar
      Merging r257645: · 191172e5
      Dimitry Andric authored
      ```---------------------------------------------------------------------
      r257645 | dim | 2016-01-13 19:29:46 +0100 (Wed, 13 Jan 2016) | 22 lines
      
      Avoid undefined behavior in LinkAllPasses.h
      
      The LinkAllPasses.h file is included in several main programs, to force
      a large number of passes to be linked in.  However, the ForcePassLinking
      constructor uses undefined behavior, since it calls member functions on
      `nullptr`, e.g.:
      
            ((llvm::Function*)nullptr)->viewCFGOnly();
            llvm::RGPassManager RGM;
            ((llvm::RegionPass*)nullptr)->runOnRegion((llvm::Region*)nullptr, RGM);
      
      When the optimization level is -O2 or higher, the code below the first
      nullptr dereference is optimized away, and replaced by `ud2` (on x86).
      
      Therefore, the calls after that first dereference are never emitted.  In
      my case, I noticed there was no call to `llvm::sys::RunningOnValgrind()`!
      
      Replace instances of dereferencing `nullptr` with either objects on the
      stack, or regular function calls.
      
      Differential Revision: http://reviews.llvm.org/D15996
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 257660
      191172e5
    • Paul Robinson's avatar
      Release note for debugger tuning · 0247e865
      Paul Robinson authored
      llvm-svn: 257654
      0247e865
    • Hans Wennborg's avatar
      Drop 'svn' suffix from version. · e77a9339
      Hans Wennborg authored
      llvm-svn: 257651
      e77a9339
    • Hans Wennborg's avatar
      Creating release_38 branch off revision 257626 · 97f35831
      Hans Wennborg authored
      llvm-svn: 257641
      llvm-svn: 257640
      llvm-svn: 257639
      llvm-svn: 257638
      llvm-svn: 257637
      llvm-svn: 257636
      llvm-svn: 257635
      llvm-svn: 257634
      llvm-svn: 257633
      llvm-svn: 257631
      llvm-svn: 257630
      97f35831
    • Sanjay Patel's avatar
      fix typo · f2341685
      Sanjay Patel authored
      llvm-svn: 257626
      f2341685
    • Marek Olsak's avatar
      AMDGPU/SI: Fix a GPU hang with POS_W_FLOAT enabled · 46dadbfa
      Marek Olsak authored
      Reviewers: tstellarAMD, arsenm
      
      Subscribers: arsenm
      
      Differential Revision: http://reviews.llvm.org/D16037
      
      llvm-svn: 257625
      46dadbfa
    • Marek Olsak's avatar
      AMDGPU/SI: Add tests for non-void functions and InitialPSInputAddr · 774c0d68
      Marek Olsak authored
      Reviewers: tstellarAMD, arsenm
      
      Differential Revision: http://reviews.llvm.org/D16036
      
      llvm-svn: 257624
      774c0d68
    • Marek Olsak's avatar
      AMDGPU/SI: Remove ending s_endpgm from non-void functions · 3c0ebc71
      Marek Olsak authored
      Reviewers: tstellarAMD, arsenm
      
      Subscribers: arsenm
      
      Differential Revision: http://reviews.llvm.org/D16035
      
      llvm-svn: 257623
      3c0ebc71
    • Marek Olsak's avatar
      AMDGPU/SI: Add s_waitcnt at the end of non-void functions · 8e9cc63b
      Marek Olsak authored
      Summary:
      v2: Make ReturnsVoid private, so that I can another 8 lines of code and
          look more productive.
      
      Reviewers: tstellarAMD, arsenm
      
      Subscribers: arsenm
      
      Differential Revision: http://reviews.llvm.org/D16034
      
      llvm-svn: 257622
      8e9cc63b
    • Marek Olsak's avatar
      AMDGPU/SI: Add support for non-void functions · 8a0f335a
      Marek Olsak authored
      Summary:
      Return values can be stored in SGPRs (i32) and VGPRs (f32).
      
      This will be used by functions which expect some bytecode or other binary to
      be appended at the end. It allows defining in which registers the return
      values will be stored.
      
      v2: don't do this for compute shaders
      
      Reviewers: tstellarAMD, arsenm
      
      Subscribers: arsenm
      
      Differential Revision: http://reviews.llvm.org/D16033
      
      llvm-svn: 257621
      8a0f335a
    • Derek Schuff's avatar
      [WebAssemly] Invalidate liveness in CFG stackifier · 9c3bf318
      Derek Schuff authored
      WebAssemblyCFGStackify does not track liveness for EXPR_STACK, causing
      verifier failure if liveness has not already been invalidated.
      
      llvm-svn: 257620
      9c3bf318
    • Dan Gohman's avatar
      [WebAssembly] Enable the builtins library for WebAssembly. · 746cd84e
      Dan Gohman authored
      llvm-svn: 257619
      746cd84e
    • Dan Gohman's avatar
      [WebAssembly] clang supports int128_t on wasm32 in addition to wasm64. · 01731fc1
      Dan Gohman authored
      llvm-svn: 257618
      01731fc1
    • Sanjay Patel's avatar
      fix typo · 7169960f
      Sanjay Patel authored
      llvm-svn: 257617
      7169960f
    • Dan Liew's avatar
      [lit] Fix handling of per test timeout when the installed psutil version · 5a009c16
      Dan Liew authored
      is < ``2.0``.
      
      Older versions of psutil (e.g. ``1.2.1`` which is the version shipped with
      Ubuntu 14.04) use a different API for retrieving the child processes.
      To handle this try the new API first and if that fails try the old API.
      
      llvm-svn: 257616
      5a009c16
    • Daniel Jasper's avatar
      clang-format: [ObjC+JS] Allow bin-packing of array literals. · 50780ce1
      Daniel Jasper authored
      After reading the style guides again, they don't actually say how to
      pack or not pack array literals. Based on some user reports, array
      initializers can unnecessarily get quite long if they contain many
      small elements. Array literals with trailing commas are still formatted
      one per line so that users have a way to opt out of the packing.
      
      Before:
        var array = [
          aaaaaa,
          aaaaaa,
          aaaaaa,
          aaaaaa,
          aaaaaa,
          aaaaaa,
          aaaaaa,
          aaaaaa,
          aaaaaa,
          aaaaaa
        ];
      
      After:
        var array = [
          aaaaaa, aaaaaa, aaaaaa, aaaaaa, aaaaaa, aaaaaa, aaaaaa, aaaaaa, aaaaaa,
          aaaaaa, aaaaaa
        ];
      
      llvm-svn: 257615
      50780ce1
    • Dan Gohman's avatar
      [WebAssembly] Accomodate wasm's 128-bit long double. · d51bd8dd
      Dan Gohman authored
      llvm-svn: 257614
      d51bd8dd
    • Sanjay Patel's avatar
      fix typo · c775fa43
      Sanjay Patel authored
      llvm-svn: 257613
      c775fa43
    • Dan Gohman's avatar
      [WebAssembly] Set std::numeric_limits's traps field for WebAssembly. · 4a9e173e
      Dan Gohman authored
      WebAssembly's integer division instruction traps on division by zero; set the
      traps field of integral std::numeric_limits to true.
      
      llvm-svn: 257612
      4a9e173e
    • Sanjay Patel's avatar
      fix typo · bf83f9aa
      Sanjay Patel authored
      llvm-svn: 257611
      bf83f9aa
    • Scott Egerton's avatar
      Revert r257602 because it breaks integrated-as.s on mips hosts. · 2df06baf
      Scott Egerton authored
      llvm-svn: 257610
      2df06baf
    • Nicolai Haehnle's avatar
      AMDGPU/SI: Add SI Machine Scheduler · 02c32915
      Nicolai Haehnle authored
      Summary:
      It is off by default, but can be used
      with --misched=si
      
      Patch by: Axel Davy
      
      Reviewers: arsenm, tstellarAMD, nhaehnle
      
      Subscribers: nhaehnle, solenskiner, arsenm, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D11885
      
      llvm-svn: 257609
      02c32915