1. Nov 01, 2017
  2. Oct 31, 2017
    • Pavel Labath's avatar
      Add a "watchpoint" test category and annotate tests appropriately · 22e71a03
      Pavel Labath authored
      Most of the watchpoint tests are organized into subtrees, so we can use the
      file-based .categories approach to annotate them. The exception are the
      concurrent_events tests, which needed to be annotated on a per-test basis.
      
      The motivation behind this is to provide an easy way to disable watchpoint
      tests on systems where the watchpoint functionality is not present/unreliable.
      
      llvm-svn: 317004
      22e71a03
    • Benjamin Kramer's avatar
      [LoopVectorize] Replace manual VPlan memory management with unique_ptr. · 3f3d5be7
      Benjamin Kramer authored
      No functionality change intended.
      
      llvm-svn: 317003
      3f3d5be7
    • George Rimar's avatar
      [ELF] - Remove useless code. NFC. · f173a630
      George Rimar authored
      We set Type and Flags inside OutputSection::addSection,
      so this lines looks to be excessive.
      
      llvm-svn: 317002
      f173a630
    • Jonas Devlieghere's avatar
      [test] Fix dsymutil/cmdline.test · 5a213f2f
      Jonas Devlieghere authored
      This fixes dsymutil/cmdline.test on platforms where the dsymutil binary
      has an extension.
      
      llvm-svn: 317001
      5a213f2f
    • Florian Hahn's avatar
      [Reassociate] Remove FIXME from looptest.ll (NFC) · 51787b20
      Florian Hahn authored
      Summary: The loop invariant add (i+j) is reassoicated, I think the FIXME can be removed, because this is what the test case tries to check (AFAIK). I also changed the test to use FileCheck.
      
      Reviewers: mcrosier, davide
      
      Reviewed By: mcrosier, davide
      
      Subscribers: davide, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D39424
      
      llvm-svn: 317000
      51787b20
    • Jonas Devlieghere's avatar
      [dsymutil] Implement the --threads option · 2dd98483
      Jonas Devlieghere authored
      This patch adds the --threads option to dsymutil to process
      architectures in parallel. The feature is already present in the version
      distributed with Xcode, but was not yet upstreamed.
      
      This is NFC as far as the linking behavior is concerned. As threads are
      used automatically, the current tests cover the change in
      implementation.
      
      Differential revision: https://reviews.llvm.org/D39355
      
      llvm-svn: 316999
      2dd98483
    • Oleg Ranevskyy's avatar
      [lld] Fix --exclude-libs broken when --whole-archive is used · 0cf24ed9
      Oleg Ranevskyy authored
      Summary:
      **Problem**
      `--exclude-libs` does not work for static libraries affected by the `--whole-archive` option.
      
      **Description**
      `--exclude-libs` creates a list of static library paths and does library lookups in this list.
      `--whole-archive` splits the static libraries that follow it into separate objects. As a result, lld no longer sees static libraries among linked files and does no `--exclude-libs` lookups.
      
      **Solution**
      The proposed solution is to make `--exclude-libs` consider object files too. When lld finds an object file it checks whether this file originates from an archive and, if so, looks the archive up in the `--exclude-libs` list.
      
      Reviewers: ruiu, rafael
      
      Reviewed By: ruiu
      
      Subscribers: asl, ikudrin, llvm-commits, emaste
      
      Tags: #lld
      
      Differential Revision: https://reviews.llvm.org/D39353
      
      llvm-svn: 316998
      0cf24ed9
    • Pavel Labath's avatar
      Fix LLVM_LINK_LLVM_DYLIB build (pr35053) · f753bfee
      Pavel Labath authored
      Summary:
      r316368 broke this build when it introduced a reference to a pthread
      function to the Utility module. This caused cmake to generate an
      incorrect link line (wrong order of libs) because it did not see the
      dependency from Utility to the system libraries. Instead these libraries
      were being manually added to each final target.
      
      This changes moves the dependency management from the individual targets
      to the lldbUtility module, which is consistent with how llvm does it.
      The final targets will pick up these libraries as they will be a part of
      the link interface of the module.
      
      Technically, some of these dependencies could go into the host module,
      as that's where most of the os-specific code is, but I did not try to
      investigate which ones.
      
      Reviewers: zturner, sylvestre.ledru
      
      Subscribers: lldb-commits, mgorny
      
      Differential Revision: https://reviews.llvm.org/D39246
      
      llvm-svn: 316997
      f753bfee
    • Teresa Johnson's avatar
      [ThinLTO] Double bits of module hash used for renaming · d1089e5c
      Teresa Johnson authored
      Summary:
      Use 64 instead of 32 bits of the module hash as the suffix when renaming
      after promotion to reduce the likelihood of a collision (which we
      observed in a binary when using 32 bits).
      
      Reviewers: pcc
      
      Subscribers: llvm-commits, inglorion
      
      Differential Revision: https://reviews.llvm.org/D39443
      
      llvm-svn: 316996
      d1089e5c
    • Michael Kruse's avatar
      [DeLICM] Fix wrong assumed access execution order. · ff426d97
      Michael Kruse authored
      ForwardOpTree may already transform a scalar access to an array
      accesses. The access remains implicit (isOriginalScalarKind(), meaning
      that the access is always executed at the begin/end of a statement), but
      targets an array (isLatestArrayKind(), which is unrelated to whether the
      execution is implicit/explicit).
      
      Fix by properly using isOriginalXXX() to determine execution order.
      
      This fixes the buildbots on MultiSource/Benchmarks/DOE-ProxyApps-C/miniGMG.
      
      llvm-svn: 316995
      ff426d97
    • Matthew Simpson's avatar
      [InstCombine] Simplify selects that test cmpxchg instructions · b6915fbf
      Matthew Simpson authored
      If a select instruction tests the returned flag of a cmpxchg instruction and
      selects between the returned value of the cmpxchg instruction and its compare
      operand, the result of the select will always be equal to its false value.
      
      Differential Revision: https://reviews.llvm.org/D39383
      
      llvm-svn: 316994
      b6915fbf
    • Pavel Labath's avatar
      Increase AdbClient read timeout · aee3e26c
      Pavel Labath authored
      The previous value was not sufficient for Pixel 2 phones. One would have
      hoped that the newer phones are faster, but that does not seem to be the
      case here.
      
      llvm-svn: 316993
      aee3e26c
    • Pavel Labath's avatar
      Add data formatter for libc++'s forward_list · 89ac0c7d
      Pavel Labath authored
      Summary:
      This adds a data formatter for the implementation of forward_list in
      libc++. I've refactored the existing std::list data formatter a bit to
      enable more sharing of code (mainly the loop detection stuff).
      
      Reviewers: jingham, EricWF
      
      Subscribers: srhines, eugene, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D35556
      
      llvm-svn: 316992
      89ac0c7d
    • Pavel Labath's avatar
      Fix mac build broken in r316987 · e4435642
      Pavel Labath authored
      Forgot one occurence of ArchSpec::SetTriple in mac-specific code.
      
      llvm-svn: 316990
      e4435642
    • Ayman Musa's avatar
      Adding a shufflevector and select LLVM IR instructions fuzz tool · 25589e2a
      Ayman Musa authored
      Based on similar python tool - utils/shuffle-fuzz.py - this tool extends the ability of it's previous by optionally attaching select instruction to the generated shufflevector instructions.
      This was mainly developed to perform exhaustive testing of the X86 AVX512 masked shuffle instructions. But yet it can be used for various other targets.
      The general design of the implementation is much modular than the original shuffle_fuzz.py tool, which makes it easier for anyone to extend it further.
      
      Differential Revision: https://reviews.llvm.org/D38031
      
      Change-Id: I0efc2aaa091b61a8a9552311c21cc77916a97111
      llvm-svn: 316989
      25589e2a
    • Ivan A. Kosarev's avatar
      [CodeGen] Propagate may-alias'ness of lvalues with TBAA info · b9c59f36
      Ivan A. Kosarev authored
      This patch fixes various places in clang to propagate may-alias
      TBAA access descriptors during construction of lvalues, thus
      eliminating the need for the LValueBaseInfo::MayAlias flag.
      
      This is part of D38126 reworked to be a separate patch to
      simplify review.
      
      Differential Revision: https://reviews.llvm.org/D39008
      
      llvm-svn: 316988
      b9c59f36
    • Pavel Labath's avatar
      Invert ArchSpec<->Platform dependency · 7263f1bd
      Pavel Labath authored
      Summary:
      ArchSpec::SetTriple was taking a Platform as an argument, and used it to
      fill in missing pieces of the specified triple. I invert the dependency
      by moving this code to other classes. For this purpose, I've created
      three new functions.
      - HostInfo::GetAugmentedArchSpec: fills in the triple using the host
        platform (this used to be implemented by passing a null platform
        pointer). By putting this code in the Host module, we can provide a
        way to anyone who does not have a platform instance (lldb-server) an
        easy way to get Host data.
      - Platform::GetAugmentedArchSpec: if you have a platform instance, you
        can call this to let it fill in the triple.
      - static Platform::GetAugmentedArchSpec: implements the "if platform ==
        0 then use_host() else use_platform()" part.
      
      Reviewers: zturner, jingham, clayborg
      
      Subscribers: mgorny, javed.absar, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D39387
      
      llvm-svn: 316987
      7263f1bd
    • David Green's avatar
      [LoopUnroll] Clean up remarks for unroll remainder · 64f53b42
      David Green authored
      The optimisation remarks for loop unrolling with an unrolled remainder looks something like:
      
      test.c:7:18: remark: completely unrolled loop with 3 iterations [-Rpass=loop-unroll]
                  C[i] += A[i*N+j];
                       ^
      test.c:6:9: remark: unrolled loop by a factor of 4 with run-time trip count [-Rpass=loop-unroll]
              for(int j = 0; j < N; j++)
              ^
      This removes the first of the two messages.
      
      Differential revision: https://reviews.llvm.org/D38725
      
      llvm-svn: 316986
      64f53b42
    • Pavel Labath's avatar
      Android.rules: build with "unified android headers" · 73447900
      Pavel Labath authored
      Unified headers will be the only way to build applications in NDK r16,
      and it also works with NDK r15.
      
      This also bumps the minimum supported android version to 16.
      
      llvm-svn: 316985
      73447900
    • George Rimar's avatar
      [ELF] - Simplify output section creation. · f9b04fd9
      George Rimar authored
      When there is no SECTION commands given, all sections are
      technically orphans, but now we handle script orphans sections
      and regular "orphans" sections for non-scripted case differently,
      though we can handle them at one place.
      
      Patch do that change.
      
      Differential revision: https://reviews.llvm.org/D39045
      
      llvm-svn: 316984
      f9b04fd9
    • Michael Kruse's avatar
      [OpenMP] Fix reference collection of latest base ptrs. · 06618bf7
      Michael Kruse authored
      When collecting base pointers that need to be made available in parallel
      subfunctions, use the base pointer associated with the latest
      ScopArrayInfo, instead of the original one.
      
      llvm-svn: 316983
      06618bf7
    • Pavel Labath's avatar
      Split makefile for TestTopLevelExprs · 64325c51
      Pavel Labath authored
      this test was using a single makefile to build two executables. This
      setup, although not supported by Makefile.rules, happened to
      work in most configurations, except when building with the android ndk
      r16.
      
      Here I move the building of the second executable to a separate
      makefile, which is the solution other tests use for multiple targets.
      
      llvm-svn: 316982
      64325c51
    • Michael Zuckerman's avatar
      [AVX512] Adding new patterns for extract_subvector of vXi1 · 9e58831c
      Michael Zuckerman authored
      extract subvector of vXi1 from vYi1 is poorly supported by LLVM and most of the time end with an assertion.
      This patch fixes this issue by adding new patterns to the TD file.
      
      Reviewers:
      1. guyblank
      2. igorb
      3. zvi
      4. ayman
      5. craig.topper
      
      Differential Revision: https://reviews.llvm.org/D39292
      
      Change-Id: Ideb4d7e946c8d40cfce2920891f2d89fe64c58f8
      llvm-svn: 316981
      9e58831c
    • Serguei Katkov's avatar
      [CGP] Fix the detection of trivial case for addressing mode · f66a59ee
      Serguei Katkov authored
      The address can be presented as a bitcast of baseReg.
      In this case it is still trivial but OriginalValue != baseReg.
      
      llvm-svn: 316980
      f66a59ee
    • Max Kazantsev's avatar
      [IRCE][NFC] Rename fields of InductiveRangeCheck · 84286ce5
      Max Kazantsev authored
      Rename `Offset`, `Scale`, `Length` into `Begin`, `Step`, `End` respectively
      to make naming of similar entities for Ranges and Range Checks more
      consistent.
      
      Differential Revision: https://reviews.llvm.org/D39414
      
      llvm-svn: 316979
      84286ce5
    • Craig Topper's avatar
      [X86] Make AVX512_512_SET0 XMM16-31 lower to 128-bit XOR when AVX512VL is... · beed6531
      Craig Topper authored
      [X86] Make AVX512_512_SET0 XMM16-31 lower to 128-bit XOR when AVX512VL is enabled. Use 128-bit VLX instruction when VLX is enabled.
      
      Unfortunately, this weakens our ability to do domain fixing when AVX512DQ is not enabled, but it is consistent with our 256-bit behavior.
      
      Maybe we should add custom handling to domain fixing to allow EVEX integer XOR/AND/OR/ANDN to switch to VEX encoded fp instructions if the high registers aren't being used?
      
      llvm-svn: 316978
      beed6531
    • Max Kazantsev's avatar
      [NFC] Get rid of variables used in assert only · 21e7b534
      Max Kazantsev authored
      llvm-svn: 316977
      21e7b534
    • Philip Reames's avatar
      [IndVarSimplify] Simplify code using preheader assumption · 59bf1e05
      Philip Reames authored
      As noted in the nice block comment, the previous code didn't actually handle multi-entry loops correctly, it just assumed SCEV didn't analyze such loops.  Given SCEV has comments to the contrary, that seems a bit suspect.  More importantly, the pass actually requires loopsimplify form which ensures a loop-preheader is available.  Remove the excessive generaility and shorten the code greatly.
      
      Note that we do successfully analyze many multi-entry loops, but we do so by converting them to single entry loops.  See the added test case.
      
      llvm-svn: 316976
      59bf1e05
    • Max Kazantsev's avatar
      Reapply "[GVN] Prevent LoadPRE from hoisting across instructions that don't... · 488ec975
      Max Kazantsev authored
      Reapply "[GVN] Prevent LoadPRE from hoisting across instructions that don't pass control flow to successors"
      
      This patch fixes the miscompile that happens when PRE hoists loads across guards and
      other instructions that don't always pass control flow to their successors. PRE is now prohibited
      to hoist across such instructions because there is no guarantee that the load standing after such
      instruction is still valid before such instruction. For example, a load from under a guard may be
      invalid before the guard in the following case:
        int array[LEN];
        ...
        guard(0 <= index && index < LEN);
        use(array[index]);
      
      Differential Revision: https://reviews.llvm.org/D37460
      
      llvm-svn: 316975
      488ec975
    • Philip Reames's avatar
      [SimplifyIndVar] Extract out invariant expression handling · 39a8dbff
      Philip Reames authored
      Previously, the code returned early from the *function* when it couldn't find a free expansion, it should be returning from the *transform*.  I don't have a test case, noticed this via inspection.
      
      As a follow up, I'm going to revisit the logic in the extract function.  I think that essentially the whole helper routine can be replaced with SCEVExpander, but I wanted to do that in a series of separate commits.
      
      llvm-svn: 316974
      39a8dbff
    • Craig Topper's avatar
      [X86] Clang-format some code. NFC · 668b1ab6
      Craig Topper authored
      llvm-svn: 316973
      668b1ab6
    • Shoaib Meenai's avatar
      [cmake] Make check_linker_flags operate via linker flags · 72404b80
      Shoaib Meenai authored
      `check_linker_flags` currently sets the *compiler* flags (via
      `CMAKE_REQUIRED_FLAGS`), and thus implicitly relies on cmake's default
      behavior of passing the compiler flags to the linker. This breaks when
      cmake's build rules have been altered to not pollute the link line with
      compiler flags (which can be desirable for build cleanliness). Instead,
      set `CMAKE_EXE_LINKER_FLAGS` explicitly and use `CMP0056` to ensure the
      linker flags are passed along. Additionally, since we're inside a
      function, we can just alter the variable directly (as the alteration
      will be limited to the scope of the function) rather than saving and
      restoring the old value.
      
      Differential Revision: https://reviews.llvm.org/D39431
      
      llvm-svn: 316972
      72404b80
    • Alex Lorenz's avatar
      [refactor] select the entire DeclStmt if one ifs decls is selected · b87b6bf7
      Alex Lorenz authored
      llvm-svn: 316971
      b87b6bf7
    • Marshall Clow's avatar
      Fix broken links; update more issues. · 336c30e2
      Marshall Clow authored
      llvm-svn: 316970
      336c30e2
    • Marshall Clow's avatar
      30631ea6
    • Philip Reames's avatar
      Undo accidental commit · 5552f503
      Philip Reames authored
      These files shouldn't have been submitted in 316967
      
      llvm-svn: 316968
      5552f503
    • Philip Reames's avatar
      [CGP] Fix crash on i96 bit multiply · 9c3cbeea
      Philip Reames authored
      Issue found by llvm-isel-fuzzer on OSS fuzz, https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3725
      
      If anyone actually cares about > 64 bit arithmetic, there's a lot more to do in this area.  There's a bunch of obviously wrong code in the same function.  I don't have the time to fix all of them and am just using this to understand what the workflow for fixing fuzzer cases might look like.
      
      llvm-svn: 316967
      9c3cbeea
    • Alex Lorenz's avatar
      c38ba669
    • Richard Smith's avatar
      [modules] Retain multiple using-directives in the same scope even if they name the same namespace. · a544c51e
      Richard Smith authored
      They might have different visibility, and thus discarding all but one of them
      can result in rejecting valid code. Also fix name lookup to cope with multiple
      using-directives being found that denote the same namespace, where some are not
      visible -- don't cache an "already visited" state for a using-directive that we
      didn't visit because it was hidden.
      
      llvm-svn: 316965
      a544c51e