Skip to content
  1. Dec 04, 2017
    • Hiroshi Yamauchi's avatar
      Move splitIndirectCriticalEdges() to BasicBlockUtils.h. · 9364fa34
      Hiroshi Yamauchi authored
      Summary:
      Move splitIndirectCriticalEdges() from CodeGenPrepare to BasicBlockUtils.h so
      that it can be called from other places.
      
      Reviewers: davidxl
      
      Reviewed By: davidxl
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D40750
      
      llvm-svn: 319689
      9364fa34
    • Aaron Ballman's avatar
      Now that C++17 is official (https://www.iso.org/standard/68564.html), start... · c351fba6
      Aaron Ballman authored
      Now that C++17 is official (https://www.iso.org/standard/68564.html), start changing the C++1z terminology over to C++17. NFC intended, these are all mechanical changes.
      
      llvm-svn: 319688
      c351fba6
    • Marshall Clow's avatar
      Implement P0457R2: 'String Prefix and Suffix Checking' for c++2a · 800259c9
      Marshall Clow authored
      llvm-svn: 319687
      800259c9
    • Matthias Braun's avatar
      Add missing triple args to tests · de4c0ae2
      Matthias Braun authored
      llvm-svn: 319686
      de4c0ae2
    • Matt Morehouse's avatar
      [libFuzzer] Remove const from ignoreRemainingArgs return value. · e911a5d3
      Matt Morehouse authored
      In this case const does nothing but trigger a warning.
      
      llvm-svn: 319685
      e911a5d3
    • Kostya Serebryany's avatar
      design document for a hardware-assisted memory safety (HWAMS) tool, similar to AddressSanitizer · f51f580b
      Kostya Serebryany authored
      Summary:
      preliminary design document for a hardware-assisted memory safety (HWAMS) tool, similar to AddressSanitizer
      The name TaggedAddressSanitizer and the rest of the document, are early draft, suggestions are welcome.
      
      The code will follow shortly.
      
      Reviewers: eugenis, alekseyshl
      
      Reviewed By: eugenis
      
      Subscribers: davidxl, cryptoad, fedor.sergeev, cfe-commits, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D40568
      
      llvm-svn: 319684
      f51f580b
    • Haicheng Wu's avatar
      [ConstantFold] Support vector index when factoring out GEP index into preceding dimensions · 234eabaf
      Haicheng Wu authored
      Follow-up of r316824. This patch supports the vector type for both current and
      previous index when factoring out the current one into the previous one.
      
      Differential Revision: https://reviews.llvm.org/D39556
      
      llvm-svn: 319683
      234eabaf
    • Matt Morehouse's avatar
      [libFuzzer] Remove FuzzerCommand.cpp from build sources. · dc81fd6c
      Matt Morehouse authored
      FuzzerCommand.cpp was not introduced in r319680.  Instead, it was
      implemented in the header file.
      
      llvm-svn: 319682
      dc81fd6c
    • Alex Shlyapnikov's avatar
      [ASan] Disable invalid-pointer-pairs-threads.cc on Darwin. · 98428214
      Alex Shlyapnikov authored
      pthread barriers are not available on OS X
      
      Differential revision: https://reviews.llvm.org/D40600
      
      llvm-svn: 319681
      98428214
    • Matt Morehouse's avatar
      [libFuzzer] Encapsulate commands in a class. · 04304d12
      Matt Morehouse authored
      Summary:
      To be more portable (especially w.r.t. platforms without system()),
      commands should be managed programmatically rather than via string
      manipulation on the command line. This change introduces
      Fuzzer::Command, with methods to manage arguments and flags, set output
      options, and execute the command.
      
      Patch By: aarongreen
      
      Reviewers: kcc, morehouse
      
      Reviewed By: kcc, morehouse
      
      Subscribers: llvm-commits, mgorny
      
      Differential Revision: https://reviews.llvm.org/D40103
      
      llvm-svn: 319680
      04304d12
    • Sanjoy Das's avatar
      [SCEV] Use a "Discovered" set instead of a "Visited" set; NFC · adf37517
      Sanjoy Das authored
      Suggested by Max Kazantsev in https://reviews.llvm.org/D39361
      
      llvm-svn: 319679
      adf37517
    • Sanjoy Das's avatar
      [SCEV] A different fix for PR33494 · 7e363379
      Sanjoy Das authored
      Summary:
      I don't think rL309080 is the right fix for PR33494 -- caching ExitLimit only
      hides the problem[0].  The real issue is that because of how we forget SCEV
      expressions ScalarEvolution::getBackedgeTakenInfo, in the test case for PR33494
      computing the backedge for any loop invalidates the trip count for every other
      loop.  This effectively makes the SCEV cache useless.
      
      I've instead made the SCEV expression invalidation in
      ScalarEvolution::getBackedgeTakenInfo less aggressive to fix this issue.
      
      [0]: One way to think about this is that rL309080 essentially augmented the
      backedge-taken-count cache with another equivalent exit-limit cache.  The bug
      went away because we were explicitly not clearing the exit-limit cache in
      getBackedgeTakenInfo.  But instead of doing all of that, we can just avoid
      clearing the backedge-taken-count cache.
      
      Reviewers: mkazantsev, mzolotukhin
      
      Subscribers: mcrosier, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D39361
      
      llvm-svn: 319678
      7e363379
    • Sanjoy Das's avatar
      [BypassSlowDivision] Improve our handling of divisions by constants · aa92cae1
      Sanjoy Das authored
      (This reapplies r314253.  r314253 was reverted on r314482 because of a
      correctness regression on P100, but that regression was identified to be
      something else.)
      
      Summary:
      Don't bail out on constant divisors for divisions that can be narrowed without
      introducing control flow .  This gives us a 32 bit multiply instead of an
      emulated 64 bit multiply in the generated PTX assembly.
      
      Reviewers: jlebar
      
      Subscribers: jholewinski, mcrosier, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D38265
      
      llvm-svn: 319677
      aa92cae1
    • Marshall Clow's avatar
      feb83432
    • Matthias Braun's avatar
      7eae251b
    • Kostya Kortchinsky's avatar
      [sanitizer] 64-bit allocator's PopulateFreeArray partial refactor · d4a774d5
      Kostya Kortchinsky authored
      Summary:
      This is an attempt at making `PopulateFreeArray` less obscure, more consistent,
      and a tiny bit faster in some circumstances:
      - use more consistent variable names, that work both for the user & the metadata
        portions of the code; the purpose of the code is mostly the same for both
        regions, so it makes sense that the code should be mostly similar as well;
      - replace the while sum loops with a single `RoundUpTo`;
      - mask most of the metadata computations behind kMetadataSize, allowing some
        blocks to be completely optimized out if not use metadata;
      - `const` the constant variables;
      - add a `LIKELY` as the branch it applies to will almost always be taken.
      
      Reviewers: alekseyshl, flowerhack
      
      Reviewed By: alekseyshl
      
      Subscribers: kubamracek, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D40754
      
      llvm-svn: 319673
      d4a774d5
    • Aaron Ballman's avatar
      Changing mixed CRLFs back to LFs; NFC. · 237e2644
      Aaron Ballman authored
      llvm-svn: 319672
      237e2644
    • Alex Shlyapnikov's avatar
      [ASan] Fix test/asan/TestCases/Posix/invalid-pointer-pairs-threads.cc · ebbbf0eb
      Alex Shlyapnikov authored
      Explicitly add pthread for asan-dynamic config.
      
      Differential revision: https://reviews.llvm.org/D40600
      
      llvm-svn: 319671
      ebbbf0eb
    • Kamil Rytarowski's avatar
      Handle NetBSD symbol renaming in sanitizer_common_interceptors.inc · 8e0eca0e
      Kamil Rytarowski authored
      Summary:
      NetBSD renames symbols for historical and compat reasons.
      
      Add required symbol renames in sanitizer_common_interceptors.inc:
      
       - clock_gettime -> __clock_gettime50
       - clock_getres -> __clock_getres50
       - clock_settime -> __clock_settime50
       - setitimer -> __setitimer50
       - getitimer -> __getitimer50
       - opendir -> __opendir30
       - readdir -> __readdir30
       - time -> __time50
       - localtime_r -> __localtime_r50
       - gmtime_r -> __gmtime_r50
       - gmtime -> __gmtime50
       - ctime -> __ctime50
       - ctime_r -> __ctime_r50
       - mktime -> __mktime50
       - getpwnam -> __getpwnam50
       - getpwuid -> __getpwuid50
       - getpwnam_r -> __getpwnam_r50
       - getpwuid_r -> __getpwuid_r50
       - getpwent -> __getpwent50
       - glob -> __glob30
       - wait3 -> __wait350
       - wait4 -> __wait450
       - readdir_r -> __readdir_r30
       - setlocale -> __setlocale50
       - scandir -> __scandir30
       - sigtimedwait -> __sigtimedwait50
       - sigemptyset -> __sigemptyset14
       - sigfillset -> __sigfillset14
       - sigpending -> __sigpending14
       - sigprocmask -> __sigprocmask14
       - shmctl -> __shmctl50
       - times -> __times13
       - stat -> __stat50
       - getutent -> __getutent50
       - getutxent -> __getutxent50
       - getutxid -> __getutxid50
       - getutxline -> __getutxline50
      
      Sponsored by <The NetBSD Foundation>
      
      Reviewers: joerg, vitalybuka, cryptoad, dvyukov
      
      Reviewed By: cryptoad
      
      Subscribers: llvm-commits, kubamracek, #sanitizers
      
      Tags: #sanitizers
      
      Differential Revision: https://reviews.llvm.org/D40765
      
      llvm-svn: 319670
      8e0eca0e
    • Sterling Augustine's avatar
      These tests require x86 80-bit doubles. Mark them so. · 83df5233
      Sterling Augustine authored
      llvm-svn: 319669
      83df5233
    • Alex Shlyapnikov's avatar
      [ASan] Enhance libsanitizer support for invalid-pointer-pair. · c73d1e28
      Alex Shlyapnikov authored
      Following patch adds support of all memory origins in
      CheckForInvalidPointerPair function. For small difference of pointers,
      it's directly done in shadow memory (the limit was set to 2048B).
      Then we search for origin of first pointer and verify that the second
      one has the same origin. If so, we verify that it points either to a same
      variable (in case of stack memory or a global variable), or to a same
      heap segment.
      
      Committing on behanf of marxin and jakubjelinek.
      
      Reviewers: alekseyshl, kcc
      
      Subscribers: llvm-commits
      
      Differential revision: https://reviews.llvm.org/D40600
      
      llvm-svn: 319668
      c73d1e28
    • Ben Hamilton's avatar
      [libcxx] Set up .arcconfig to point to new Diffusion CXX repository · e00cd0c4
      Ben Hamilton authored
      Summary:
      We want to automatically copy the appropriate mailing list
      for review requests to the libc++ repository.
      
      For context, see the proposal and discussion here:
      
      http://lists.llvm.org/pipermail/cfe-dev/2017-November/056032.html
      
      Similar to D40179, I set up a new Diffusion repository with callsign
      "CXX" for libc++:
      
      https://reviews.llvm.org/source/libcxx/
      
      This explicitly updates libcxx's .arcconfig to point to the new
      CXX repository in Diffusion, which will let us use Herald rule H268.
      
      Reviewers: halyavin, EricWF, mclow.lists, compnerd, mstorsjo
      
      Reviewed By: compnerd
      
      Subscribers: cfe-commits, bkramer, dlj, sammccall, klimek, smeenai, mstorsjo, krytarowski
      
      Differential Revision: https://reviews.llvm.org/D40500
      
      llvm-svn: 319666
      e00cd0c4
    • Francis Visoiu Mistrih's avatar
      [CodeGen] Unify MBB reference format in both MIR and debug output · 25528d6d
      Francis Visoiu Mistrih authored
      As part of the unification of the debug format and the MIR format, print
      MBB references as '%bb.5'.
      
      The MIR printer prints the IR name of a MBB only for block definitions.
      
      * find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" \) -type f -print0 | xargs -0 sed -i '' -E 's/BB#" << ([a-zA-Z0-9_]+)->getNumber\(\)/" << printMBBReference(*\1)/g'
      * find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" \) -type f -print0 | xargs -0 sed -i '' -E 's/BB#" << ([a-zA-Z0-9_]+)\.getNumber\(\)/" << printMBBReference(\1)/g'
      * find . \( -name "*.txt" -o -name "*.s" -o -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" \) -type f -print0 | xargs -0 sed -i '' -E 's/BB#([0-9]+)/%bb.\1/g'
      * grep -nr 'BB#' and fix
      
      Differential Revision: https://reviews.llvm.org/D40422
      
      llvm-svn: 319665
      25528d6d
    • Pablo Barrio's avatar
      Fix function pointer tail calls in armv8-M.base · 2b438584
      Pablo Barrio authored
      Summary:
      The compiler fails with the following error message:
      
      fatal error: error in backend: ran out of registers during
      register allocation
      
      Tail call optimization for Armv8-M.base fails to meet all the required
      constraints when handling calls to function pointers where the
      arguments take up r0-r3. This is because the pointer to the
      function to be called can only be stored in r0-r3, but these are
      all occupied by arguments. This patch makes sure that tail call
      optimization does not try to handle this type of calls.
      
      Reviewers: chill, MatzeB, olista01, rengolin, efriedma
      
      Reviewed By: olista01, efriedma
      
      Subscribers: efriedma, aemerson, javed.absar, llvm-commits, kristof.beyls
      
      Differential Revision: https://reviews.llvm.org/D40706
      
      llvm-svn: 319664
      2b438584
    • Pavel Labath's avatar
      Revert "[cmake] Enable zlib support on windows" · f2fdc183
      Pavel Labath authored
      This reverts commit r319533 as it broke llvm-config --system-libs output
      and everything that depends on it (which is mostly out of tree or
      downstream folks, but includes a couple of llvm buildbots as well).
      
      I think I have a fix for this in D40779, but I want someone to look
      review it first. In the mean time, I am reverting this change, as it
      seems to break a lot of people.
      
      llvm-svn: 319663
      f2fdc183
    • Sam Kolton's avatar
      [AMDGPU] SDWA: add support for PRESERVE into SDWA peephole. · 5f7f32c3
      Sam Kolton authored
      Summary:
      
      Reviewers: arsenm, vpykhtin, rampitec
      
      Subscribers: kzhuravl, wdng, nhaehnle, mgorny, yaxunl, dstuttard, tpr, t-tye
      
      Differential Revision: https://reviews.llvm.org/D37817
      
      llvm-svn: 319662
      5f7f32c3
    • Alexey Bataev's avatar
      [OPENMP] Codegen for `distribute simd` directive. · 617db5f8
      Alexey Bataev authored
      Initial codegen support for `distribute simd` directive.
      
      llvm-svn: 319661
      617db5f8
    • Sam Parker's avatar
      [ARM] CodeGen test · 987b2c99
      Sam Parker authored
      Add another and + load DAG combine test.
      
      llvm-svn: 319660
      987b2c99
    • Anna Thomas's avatar
      [Loop Predication] Teach LP about reverse loops · 7b360434
      Anna Thomas authored
      Summary:
      Currently, we only support predication for forward loops with step
      of 1.  This patch enables loop predication for reverse or
      countdownLoops, which satisfy the following conditions:
         1. The step of the IV is -1.
         2. The loop has a singe latch as B(X) = X <pred>
      latchLimit with pred as s> or u>
         3. The IV of the guard is the decrement
      IV of the latch condition (Guard is: G(X) = X-1 u< guardLimit).
      
      This patch was downstream for a while and is the last series of patches
      that's from our LP implementation downstream.
      
      Reviewers: apilipenko, mkazantsev, sanjoy
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D40353
      
      llvm-svn: 319659
      7b360434
    • Sven van Haastregt's avatar
      [OpenCL] Define __IMAGE_SUPPORT__ macro for SPIR · d141e480
      Sven van Haastregt authored
      Add #define __IMAGE_SUPPORT__ 1 for SPIR targets to indicate that SPIR
      supports images.
      
      Patch by Dmitry Borisenkov.
      
      Differential Revision: https://reviews.llvm.org/D40252
      
      llvm-svn: 319658
      d141e480
    • Jonas Hahnfeld's avatar
      [NVPTX] Assign valid global names · 5db24d7c
      Jonas Hahnfeld authored
      PTX requires that identifiers consist only of [a-zA-Z0-9_$]. The
      existing pass already ensured this for globals and this patch adds
      the cleanup for functions with local linkage.
      
      However, there was a different problem in the case of collisions
      of the adjusted name: The ValueSymbolTable then automatically
      appended ".N" with increasing Ns to get a unique name while helping
      the ABI demangling. Special case this behavior to omit the dots and
      append N directly. This will always give us legal names according
      to the PTX requirements.
      
      Differential Revision: https://reviews.llvm.org/D40573
      
      llvm-svn: 319657
      5db24d7c
    • Jonas Devlieghere's avatar
      [NFC][lit] Use proper semantic versioning names for variables · 64774baf
      Jonas Devlieghere authored
      The variable named `minor` was actually pointing to the patch part of
      the version. While I was changing this I also made the check for Apple
      clang more robust by checking both patch and minor rather than just
      minor.
      
      llvm-svn: 319656
      64774baf
    • Sam McCall's avatar
      [clangd] Split CodeComplete into a separate file. NFC · 98775c50
      Sam McCall authored
      Summary: Shared details of ClangdUnit and CodeComplete moved to a new Compiler file.
      
      Reviewers: ilya-biryukov
      
      Subscribers: klimek, mgorny, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D40719
      
      llvm-svn: 319655
      98775c50
    • Oliver Stannard's avatar
      Revert r319649 - [Asm, ARM] Add fallback diag for multiple invalid operands · 7ab60605
      Oliver Stannard authored
      This is causing a failure in the llvm-clang-x86_64-expensive-checks-win
      buildbot, and I can't reproduce it locally, so reverting until I can work out
      what is wrong.
      
      llvm-svn: 319654
      7ab60605
    • Pavel Labath's avatar
      Makefile.rules: compile all tests with -fno-limit-debug-info · fd9a526a
      Pavel Labath authored
      Summary:
      This flag is on by default for darwin and freebsd, but off for linux.
      Without it, clang will sometimes not emit debug info for types like
      std::string. Whether it does this, and which tests will fail because of
      that depends on the linux distro and c++ library version.
      
      A bunch of tests were already setting these flags manually, but here
      instead I take a whole sale approach and enable this flag for all tests.
      Any test which does not want to have this flag (right now we have one
      such test) can turn it off explicitly via
      CFLAGS_EXTRAS+=$(LIMIT_DEBUG_INFO_FLAGS)
      
      This fixes a bunch of data formatter tests on red-hat.
      
      Reviewers: davide, jankratochvil
      
      Subscribers: emaste, aprantl, krytarowski, JDevlieghere, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D40717
      
      llvm-svn: 319653
      fd9a526a
    • Sam McCall's avatar
      Revert "[ValueTracking] Pass only a single lambda to... · d0d43e6f
      Sam McCall authored
      Revert "[ValueTracking] Pass only a single lambda to computeKnownBitsFromShiftOperator by using KnownBits struct instead of separate APInts. NFCI"
      
      This reverts commit r319624, which seems to cause a miscompile (breaks the
      multistage PPC buildbots)
      
      llvm-svn: 319652
      d0d43e6f
    • Tim Corringham's avatar
      AMDGPU: fix missing s_waitcnt · 6c6d5e24
      Tim Corringham authored
      Summary:
      The pass that inserts s_waitcnt instructions where needed propagated
      info used to track dependencies for each block by iterating over the
      predecessor blocks. The iteration was terminated when a predecessor
      that had not yet been processed was encountered. Any info in blocks
      later in the list was therefore not processed, leading to the
      possiblility of a required s_waitcnt not being inserted.
      
      The fix is simply to change the "break" to "continue" for the
      relevant loops, so that all visited blocks are processed. This
      is likely what was intended when the code was written.
      
      There is no test case provided for this fix because:
      1) the only example that reproduces this is large and resistant to
      being reduced
      2) the change is trivial
      
      Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye
      
      Differential Revision: https://reviews.llvm.org/D40544
      
      llvm-svn: 319651
      6c6d5e24
    • Kamil Rytarowski's avatar
      Move __tsan::Vector to __sanitizer · 64fc9cf2
      Kamil Rytarowski authored
      Summary:
      The low-fat STL-like vector container will be reused in MSan.
      
      It is needed to implement an atexit(3) interceptor on NetBSD/amd64 in MSan.
      
      Sponsored by <The NetBSD Foundation>
      
      Reviewers: joerg, dvyukov, eugenis, vitalybuka, kcc
      
      Reviewed By: dvyukov
      
      Subscribers: kubamracek, mgorny, llvm-commits, #sanitizers
      
      Tags: #sanitizers
      
      Differential Revision: https://reviews.llvm.org/D40726
      
      llvm-svn: 319650
      64fc9cf2
    • Oliver Stannard's avatar
      [Asm, ARM] Add fallback diag for multiple invalid operands · 7cd4db94
      Oliver Stannard authored
      This adds a "invalid operands for instruction" diagnostic for
      instructions where there is an instruction encoding with the correct
      mnemonic and which is available for this target, but where multiple
      operands do not match those which were provided. This makes it clear
      that there is some combination of operands that is valid for the current
      target, which the default diagnostic of "invalid instruction" does not.
      
      Since this is a very general error, we only emit it if we don't have a
      more specific error.
      
      Differential revision: https://reviews.llvm.org/D36747
      
      llvm-svn: 319649
      7cd4db94
    • Peter Smith's avatar
      [ELF] Add BYTE expression to test case for non-contiguous relro [NFC] · 014be8ac
      Peter Smith authored
      As well as location counter expressions. The data generating expressions
      such as BYTE can generate a non-zero sized OutputSection that will report
      0 until assignAddresses() is called. Add an example to the existing test
      case relro-non-contiguous-script-data.s.
      
      Differential Revision: https://reviews.llvm.org/D40732
      
      llvm-svn: 319648
      014be8ac
Loading