Skip to content
  1. Dec 28, 2017
    • Max Kazantsev's avatar
      [RewriteStatepoints] Fix incorrect assertion · a13e163a
      Max Kazantsev authored
      `RewriteStatepointsForGC` iterates over function blocks and their predecessors
      in order of declaration. One of outcomes of this is that callsites are placed in
      arbitrary order which has nothing to do with travelsar order.
      
      On the other hand, function `recomputeLiveInValues` asserts that bases are
      added to `Info.PointerToBase` before their deried pointers are updated. But
      if call sites are processed in order different from RPOT, this is not necessarily
      true. We cannot guarantee that the base was placed there before every
      pointer derived from it. All we can guarantee is that this base was marked as
      known base by this point.
      
      This patch replaces the fact that we assert from checking that the base was
      added to the map with assert that the base was marked as known base.
      
      Differential Revision: https://reviews.llvm.org/D41593
      
      llvm-svn: 321517
      a13e163a
    • Simon Pilgrim's avatar
      [X86][SSE] Use PMADDWD for v4i32 multiplies with 17 or more leading zeros · 62411e4d
      Simon Pilgrim authored
      If there are 17 or more leading zeros to the v4i32 elements, then we can use PMADD for the integer multiply when PMULLD is unavailable or slow.
      
      The 17 bits need to be zero as the PMADDWD performs a v8i16 signed-mul-extend + pairwise-add - the upper 16 so we're adding a zero pair and the 17th bit so we don't incorrectly sign extend.
      
      Differential Revision: https://reviews.llvm.org/D41484
      
      llvm-svn: 321516
      62411e4d
    • Simon Pilgrim's avatar
      [InstCombine] Check for isa<Instruction> before using cast<> · 472689a1
      Simon Pilgrim authored
      Protects against casts from constexpr etc.
      
      Reduced from oss-fuzz #4788 test case
      
      llvm-svn: 321515
      472689a1
    • Aaron Smith's avatar
      Remove duplicate declaration from D41550; NFC · 5a81bb73
      Aaron Smith authored
      llvm-svn: 321514
      5a81bb73
    • Rui Ueyama's avatar
      Do not parse the same /export string more than once. · a63eed0f
      Rui Ueyama authored
      Differential Revision: https://reviews.llvm.org/D41607
      
      llvm-svn: 321513
      a63eed0f
    • Bob Haarman's avatar
      [COFF] support /ignore:4217 · e90ac016
      Bob Haarman authored
      Summary:
      lld-link accepts link.exe's /ignore option, but used to ignore
      it. This can lead to semantic differences when warnings are treated as
      fatal errors. One such case is when we resolve an __imp_ symbol to a
      local definition. We emit a warning in that case, which /wx turns into
      a fatal. This change makes lld-link accept /ignore:4217 to suppress
      that warning, so that code that links with link.exe /wx /ignore:4217
      links with lld-link, too.
      
      Fixes PR35762.
      
      Reviewers: rnk, ruiu
      
      Reviewed By: ruiu
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D41606
      
      llvm-svn: 321512
      e90ac016
    • Aaron Smith's avatar
      Update failing PDB unit tests that are searching for symbols by regex · 364cbfe9
      Aaron Smith authored
      Summary: D41086 fixed an exception in FindTypes()/FindTypesByRegex() and caused two lldb unit test to fail. This change updates the unit tests to pass again.
      
      Reviewers: zturner, lldb-commits, labath, clayborg, asmith
      
      Reviewed By: asmith
      
      Differential Revision: https://reviews.llvm.org/D41550
      
      llvm-svn: 321511
      364cbfe9
    • Reid Kleckner's avatar
      Revert "[memcpyopt] Teach memcpyopt to optimize across basic blocks" · 6d31001c
      Reid Kleckner authored
      This reverts r321138. It seems there are still underlying issues with
      memdep. PR35519 seems to still be present if debug info is enabled. We
      end up losing a memcpy. Somehow during store to memset merging, we
      insert the memset after the memcpy or fail to update the memdep analysis
      to account for the newly inserted memset of a pair.
      
      Reduced test case:
      
        #include <assert.h>
        #include <stdio.h>
        #include <string>
        #include <utility>
        #include <vector>
      
        void do_push_back(
            std::vector<std::pair<std::string, std::vector<std::string>>>* crls) {
          crls->push_back(std::make_pair(std::string(), std::vector<std::string>()));
        }
      
        int __attribute__((optnone)) main() {
          // Put some data in the vector and then remove it so we take the push_back
          // fast path.
          std::vector<std::pair<std::string, std::vector<std::string>>> crl_set;
          crl_set.push_back({"asdf", {}});
          crl_set.pop_back();
          printf("first word in vector storage: %p\n", *(void**)crl_set.data());
      
          // Do the push_back which may fail to initialize the data.
          do_push_back(&crl_set);
          auto* first = &crl_set.back().first;
          printf("first word in vector storage (should be zero): %p\n",
                 *(void**)crl_set.data());
          assert(first->empty());
          puts("ok");
        }
      
      Compile with libc++, enable optimizations, and enable debug info:
      $ clang++ -stdlib=libc++ -g -O2 t.cpp -o t.exe -Wl,-rpath=llvm/build/lib
      
      This program will assert with this change.
      
      llvm-svn: 321510
      6d31001c
    • Andrew Wilkins's avatar
      [bindings/go] fix vet errors · 4371e049
      Andrew Wilkins authored
      Fix "go vet" errors, which will be
      run automatically with "go test" as
      of Go 1.10.
      
      Patch by Karsten Weiss!
      
      llvm-svn: 321509
      4371e049
    • Matt Arsenault's avatar
      AMDGPU: Add MMO to atomic_inc/dec · 27ee60ca
      Matt Arsenault authored
      This doesn't really change anything because these
      already had custom node wrappers.
      
      llvm-svn: 321508
      27ee60ca
    • Rafael Espindola's avatar
      Allow copy relocation with -z notext. · 465e7c94
      Rafael Espindola authored
      This makes adjustExpr a bit simpler too IMHO.
      
      It seems that some of the complication around relocation processing
      is that we are trying to create copy relocations too early. It seems
      we could handle a few simple cases first and continue.
      
      llvm-svn: 321507
      465e7c94
  2. Dec 27, 2017
Loading