1. Feb 03, 2020
    • Matt Arsenault's avatar
      AMDGPU/GlobalISel: Reduce indentation · e4bc55bd
      Matt Arsenault authored
      e4bc55bd
    • Matt Arsenault's avatar
      AMDGPU/GlobalISel: Fix mem size in test · 95a9b828
      Matt Arsenault authored
      This wasn't intended to tests an extload.
      95a9b828
    • Simon Moll's avatar
      [NFC][VE] format VEInstrInfo · 24215fec
      Simon Moll authored
      24215fec
    • Simon Moll's avatar
      [NFC] unsigned->Register in storeRegTo/loadRegFromStack · 5c8ba508
      Simon Moll authored
      Summary:
      This patch makes progress on the 'unsigned -> Register' rewrite for
      `TargetInstrInfo::loadRegFromStack` and `TII::storeRegToStack`.
      
      Reviewers: arsenm, craig.topper, uweigand, jpienaar, atanasyan, venkatra, robertlytton, dylanmckay, t.p.northover, kparzysz, tstellar, k-ishizaka
      
      Reviewed By: arsenm
      
      Subscribers: wuzish, merge_guards_bot, jyknight, sdardis, nemanjai, jvesely, wdng, nhaehnle, hiraditya, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, kerbowa, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D73870
      5c8ba508
    • Guillaume Chatelet's avatar
      [Alignment][NFC] Use Align for code creating MemOp · fc194659
      Guillaume Chatelet authored
      Summary:
      This is patch is part of a series to introduce an Alignment type.
      See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
      See this patch for the introduction of the type: https://reviews.llvm.org/D64790
      
      Reviewers: courbet
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D73874
      fc194659
    • John Brawn's avatar
      [FPEnv][ARM] Add lowering of STRICT_FSETCC and STRICT_FSETCCS · b37d5935
      John Brawn authored
      These can be lowered to code sequences using CMPFP and CMPFPE which then get
      selected to VCMP and VCMPE. The implementation isn't fully correct, as the chain
      operand isn't handled correctly, but resolving that looks like it would involve
      changes around FPSCR-handling instructions and how the FPSCR is modelled.
      
      The fp-intrinsics test was already testing some of this but as the entire test
      was being XFAILed it wasn't noticed. Un-XFAIL the test and instead leave the
      cases where we aren't generating the right instruction sequences as FIXME.
      
      Differential Revision: https://reviews.llvm.org/D73194
      b37d5935
    • Karasev Nikita's avatar
      Allow modernize-use-using to apply to enumerations as well. · 6423ae41
      Karasev Nikita authored
      This addresses PR44528.
      6423ae41
    • Alex Zinenko's avatar
      [mlir] ConvertStandardToLLVM: do not rely on command line options internally · e0ea706a
      Alex Zinenko authored
      The patterns for converting `std.alloc` and `std.dealoc` can be configured to
      use `llvm.alloca` instead of calling `malloc` and `free`. This configuration
      has been only possible through a command-line flag, despite the presence of a
      (misleading) parameter in the pass constructor. Use the parameter instead and
      only initalize it from the command line flags if the pass is constructed from
      the mlir-opt registration.
      e0ea706a
    • Haojian Wu's avatar
      0ce57731
    • Raphael Isemann's avatar
      [lldb] Make the order in which ClusterManager calls destructors deterministic · 7f4cb2e7
      Raphael Isemann authored
      Summary:
      ClusterManager is using a SmallPtrSet to store the objects in it. We always only add every object once so using a set is not necessary.
      Furthermore having a set means that iterating over it is nondeterministic (at least with more than 16 objects in it), so the order in
      which the destructors for the managed objects are called is currently also non-deterministic.
      
      This just replaces the SmallPtrSet with a SmallVector.
      
      Reviewers: labath, JDevlieghere
      
      Reviewed By: labath
      
      Subscribers: mgrang, abidh, lldb-commits
      
      Tags: #lldb
      
      Differential Revision: https://reviews.llvm.org/D73871
      7f4cb2e7
    • Alex Zinenko's avatar
      [mlir] Drop customization hooks from StandardToLLVM conversion · f3fa4a34
      Alex Zinenko authored
      Summary:
      These hooks were originally introduced to support passes deriving the
      StandardToLLVM conversion, in particular converting types from different
      dialects to LLVM types in a single-step conversion. They are no longer in use
      since the pass and conversion infrastructure has evolved sufficiently to make
      defining new passes with exactly the same functionality simple through the use
      of populate* functions, conversion targets and type converters. Remove the
      hooks. Any users of this hooks can call the dialect conversion infrastructure
      directly instead, which is likely to require less LoC than these hooks.
      
      Differential Revision: https://reviews.llvm.org/D73795
      f3fa4a34
    • James Henderson's avatar
      [DebugInfo][test] Adjust line table unit length to account for contents · 1271cde4
      James Henderson authored
      Previously, if a debug line Prologue was created via
      createBasicPrologue, its TotalLength field did not account for any
      contents in the table itself. This change fixes this issue.
      
      Reviewed by: probinson
      
      Differential Revision: https://reviews.llvm.org/D73772
      1271cde4
    • Marius Brehler's avatar
      [mlir] Fix link to 'Getting started with MLIR' · 9adbb6c4
      Marius Brehler authored
      The link in the toy example pointed to the 'tensorflow/mlir' repo and is
      replaced with https://mlir.llvm.org.
      
      Differential Revision: https://reviews.llvm.org/D73770
      9adbb6c4
    • Simon Tatham's avatar
      [ARM,MVE] Fix vreinterpretq in big-endian mode. · 961530fd
      Simon Tatham authored
      Summary:
      In big-endian MVE, the simple vector load/store instructions (i.e.
      both contiguous and non-widening) don't all store the bytes of a
      register to memory in the same order: it matters whether you did a
      VSTRB.8, VSTRH.16 or VSTRW.32. Put another way, the in-register
      formats of different vector types relate to each other in a different
      way from the in-memory formats.
      
      So, if you want to 'bitcast' or 'reinterpret' one vector type as
      another, you have to carefully specify which you mean: did you want to
      reinterpret the //register// format of one type as that of the other,
      or the //memory// format?
      
      The ACLE `vreinterpretq` intrinsics are specified to reinterpret the
      register format. But I had implemented them as LLVM IR bitcast, which
      is specified for all types as a reinterpretation of the memory format.
      So a `vreinterpretq` intrinsic, applied to values already in registers,
      would code-generate incorrectly if compiled big-endian: instead of
      emitting no code, it would emit a `vrev`.
      
      To fix this, I've introduced a new IR intrinsic to perform a
      register-format reinterpretation: `@llvm.arm.mve.vreinterpretq`. It's
      implemented by a trivial isel pattern that expects the input in an
      MQPR register, and just returns it unchanged.
      
      In the clang codegen, I only emit this new intrinsic where it's
      actually needed: I prefer a bitcast wherever it will have the right
      effect, because LLVM understands bitcasts better. So we still generate
      bitcasts in little-endian mode, and even in big-endian when you're
      casting between two vector types with the same lane size.
      
      For testing, I've moved all the codegen tests of vreinterpretq out
      into their own file, so that they can have a different set of RUN
      lines to check both big- and little-endian.
      
      Reviewers: dmgreen, MarkMurrayARM, miyuki, ostannard
      
      Reviewed By: dmgreen
      
      Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits
      
      Tags: #clang, #llvm
      
      Differential Revision: https://reviews.llvm.org/D73786
      961530fd
    • Simon Tatham's avatar
      [ARM,MVE] Add intrinsics for v[id]dupq and v[id]wdupq. · f8d4afc4
      Simon Tatham authored
      Summary:
      These instructions generate a vector of consecutive elements starting
      from a given base value and incrementing by 1, 2, 4 or 8. The `wdup`
      versions also wrap the values back to zero when they reach a given
      limit value. The instruction updates the scalar base register so that
      another use of the same instruction will continue the sequence from
      where the previous one left off.
      
      At the IR level, I've represented these instructions as a family of
      target-specific intrinsics with two return values (the constructed
      vector and the updated base). The user-facing ACLE API provides a set
      of intrinsics that throw away the written-back base and another set
      that receive it as a pointer so they can update it, plus the usual
      predicated versions.
      
      Because the intrinsics return two values (as do the underlying
      instructions), the isel has to be done in C++.
      
      This is the first family of MVE intrinsics that use the `imm_1248`
      immediate type in the clang Tablegen framework, so naturally, I found
      I'd given it the wrong C integer type. Also added some tests of the
      check that the immediate has a legal value, because this is the first
      time those particular checks have been exercised.
      
      Finally, I also had to fix a bug in MveEmitter which failed an
      assertion when I nested two `seq` nodes (the inner one used to extract
      the two values from the pair returned by the IR intrinsic, and the
      outer one put on by the predication multiclass).
      
      Reviewers: dmgreen, MarkMurrayARM, miyuki, ostannard
      
      Reviewed By: dmgreen
      
      Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits
      
      Tags: #clang, #llvm
      
      Differential Revision: https://reviews.llvm.org/D73357
      f8d4afc4
    • Simon Tatham's avatar
      [ARM,MVE] Add intrinsics for vdupq. · cf7e98e6
      Simon Tatham authored
      Summary:
      The unpredicated case of this is trivial: the clang codegen just makes
      a vector splat of the input, and LLVM isel is already prepared to
      handle that. For the predicated version, I've generated a `select`
      between the same vector splat and the `inactive` input parameter, and
      added new Tablegen isel rules to match that pattern into a predicated
      `MVE_VDUP` instruction.
      
      Reviewers: dmgreen, MarkMurrayARM, miyuki, ostannard
      
      Reviewed By: dmgreen
      
      Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits
      
      Tags: #clang, #llvm
      
      Differential Revision: https://reviews.llvm.org/D73356
      cf7e98e6
    • Haojian Wu's avatar
      [clang][AST] Add an AST matcher for deducedTemplateSpeializationType. · bdbdf748
      Haojian Wu authored
      Summary:
      misc-unused-using clang-tidy check needs this matcher to fix a false
      positive of C++17 deduced class template types.
      
      Reviewers: gribozavr2
      
      Reviewed By: gribozavr2
      
      Subscribers: cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D73869
      bdbdf748
    • Simon Pilgrim's avatar
    • Raphael Isemann's avatar
      Reland "[llvm] Add a way to speed up the speed in which BumpPtrAllocator increases slab sizes"" · 46e5603c
      Raphael Isemann authored
      Disable the red zone in the unit test allocator to fix the test errors in sanitizer builds.
      The red zone changed the amount of allocated bytes which made the test fail as it
      checked the number of allocated bytes of the allocator.
      46e5603c
    • Martin Storsjö's avatar
      [LLDB] Add missing declarations for linking to psapi · eb5ee927
      Martin Storsjö authored
      This fixes building for mingw with BUILD_SHARED_LIBS. In static builds,
      the psapi dependency gets linked in transitively from Support, but
      when linking Support dynamically, it's revealed that these components
      also need linking against psapi.
      
      Differential Revision: https://reviews.llvm.org/D73839
      eb5ee927
    • Clement Courbet's avatar
      [llvm-exegesis] Restrict the range of allowable rounding countrols. · 082dccac
      Clement Courbet authored
      Summary:
      It turns out that CUR_DIRECTION is just an internal placeholder, not an actual
      valid encoded value.
      
      Reviewers: gchatelet
      
      Subscribers: tschuett, mstojanovic, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D73343
      082dccac
    • Alexander Belyaev's avatar
      3dcc1fc6
    • Dmitri Gribenko's avatar
    • Hans Wennborg's avatar
    • Sam McCall's avatar
      [clangd] TUScheduler::run() (i.e. workspace/symbol) counts towards concurrent threads · 6b15a3d7
      Sam McCall authored
      This seems to just be an oversight.
      6b15a3d7
    • Sam McCall's avatar
      b79cb547
    • Raphael Isemann's avatar
      Revert "[llvm] Add a way to speed up the speed in which BumpPtrAllocator increases slab sizes" · da1fb2be
      Raphael Isemann authored
      This reverts commit b848b510 as the unit tests
      fail on the sanitizer bots:
      /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/unittests/Support/AllocatorTest.cpp:145: Failure
            Expected: SlabSize
            Which is: 4096
      To be equal to: Alloc.getTotalMemory()
            Which is: 4097
      da1fb2be
    • Raphael Isemann's avatar
      Revert "[lldb] Increase the rate at which ConstString's memory allocator... · 0afdc7be
      Raphael Isemann authored
      Revert "[lldb] Increase the rate at which ConstString's memory allocator scales the memory chunks it allocates"
      
      This reverts commit 500c324f because its parent commit
      b848b510 is failing on the sanitizer bots.
      0afdc7be
    • Sergej Jaskiewicz's avatar
      Revert "[libcxx] Force-cache LIBCXX_CXX_ABI_LIBRARY_PATH" · 1a7e688b
      Sergej Jaskiewicz authored
      This reverts commit 41f4dfd6.
      
      It broke standalone libc++ builds, which now try to use libc++abi from the wrong directory, instead of system instance.
      
      (cherry picked from commit 3573526c)
      1a7e688b
    • Guillaume Chatelet's avatar
      Fix broken invariant · 75d9994a
      Guillaume Chatelet authored
      Summary:
      A Copy with a source that is zeros is the same as a Set of zeros.
      This fixes the invariant that SrcAlign should always be non-null.
      
      Reviewers: courbet
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D73791
      75d9994a
    • Raphael Isemann's avatar
      [lldb] Increase the rate at which ConstString's memory allocator scales the... · 500c324f
      Raphael Isemann authored
      [lldb] Increase the rate at which ConstString's memory allocator scales the memory chunks it allocates
      
      Summary:
      We currently do far more malloc calls than necessary in the ConstString BumpPtrAllocator. This is due to the 256 BumpPtrAllocators
      our ConstString implementation uses internally which end up all just receiving a small share of the total allocated memory
      and therefore keep allocating memory in small chunks for far too long. This patch fixes this by increasing the rate at which we increase the
      memory chunk size so that our collection of BumpPtrAllocators behaves in total similar to a single BumpPtrAllocator.
      
      Reviewers: llunak
      
      Reviewed By: llunak
      
      Subscribers: abidh, JDevlieghere, lldb-commits
      
      Tags: #lldb
      
      Differential Revision: https://reviews.llvm.org/D71699
      500c324f
    • Clement Courbet's avatar
      [llvm-exegesis] Add pfm counters for Zen2 (znver2). · 5b2c5e26
      Clement Courbet authored
      Summary: There are no counters for individual ports, but this is already
      enough to find a lot of issues in the current model (upcoming patch).
      
      Reviewers: dblaikie, gchatelet
      
      Subscribers: hiraditya, tschuett, RKSimon, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D72032
      5b2c5e26
    • Jay Foad's avatar
      [AMDGPU] Don't remove short branches over kills · 97d9a76a
      Jay Foad authored
      Summary:
      D68092 introduced a new SIRemoveShortExecBranches optimization pass and
      broke some graphics shaders. The problem is that it was removing
      branches over KILL pseudo instructions, and the fix is to explicitly
      check for that in mustRetainExeczBranch.
      
      Reviewers: critson, arsenm, nhaehnle, cdevadas, hakzsam
      
      Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D73771
      97d9a76a
    • Stephan Herhut's avatar
      [MLIR] Make gpu.launch implicitly capture uses of values defined above. · 283b5e73
      Stephan Herhut authored
      Summary:
      In the original design, gpu.launch required explicit capture of uses
      and passing them as operands to the gpu.launch operation. This was
      motivated by infrastructure restrictions rather than design. This
      change lifts the requirement and removes the concept of kernel
      arguments from gpu.launch. Instead, the kernel outlining
      transformation now does the explicit capturing.
      
      This is a breaking change for users of gpu.launch.
      
      Differential Revision: https://reviews.llvm.org/D73769
      283b5e73
    • Sam Parker's avatar
      [JumpThreading] Half the duplicate threshold at Oz · 2663a25f
      Sam Parker authored
      Duplicating instructions can lead to code size increases but using
      a threshold of 3 is good for reducing code size.
      
      Differential Revision: https://reviews.llvm.org/D72916
      2663a25f
    • Kazuaki Ishizaki's avatar
      [mlir] NFC: Fix trivial typo in comment · 54958869
      Kazuaki Ishizaki authored
      Summary: Also, an exercise to merge this into the master myself after a reviewer gives LGTM.
      
      Reviewers: nicolasvasilache, mehdi_amini
      
      Reviewed By: mehdi_amini
      
      Subscribers: Joonsoo, merge_guards_bot, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, liufengdb, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D73432
      54958869
    • Raphael Isemann's avatar
      [llvm] Add a way to speed up the speed in which BumpPtrAllocator increases slab sizes · b848b510
      Raphael Isemann authored
      Summary:
      In D68549 we noticed that our BumpPtrAllocator we use for LLDB's ConstString implementation is growing its slabs at
      a rate that is too slow for our use case. It causes that we spend a lot of time calling `malloc` for all the tiny slabs that our
      ConstString BumpPtrAllocators create. We also can't just increase the slab size in the ConstString implementation
      (which is what D68549 originally did) as this really increased the amount of (mostly unused) allocated memory
      in any process using ConstString.
      
      This patch adds a template argument for the BumpPtrAllocatorImpl that allows specifying a faster rate at which the
      BumpPtrAllocator increases the slab size. This allows LLDB to specify a faster rate at which the slabs grow which
      should keep both memory consumption and time spent calling malloc low.
      
      Reviewers: george.karpenkov, chandlerc, NoQ
      
      Subscribers: NoQ, llvm-commits, llunak
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D71654
      b848b510
    • Martin Storsjö's avatar
      [PM][CGSCC] Add parentheses to avoid a GCC warning. NFC. · f867c8e8
      Martin Storsjö authored
      This avoids a warning about "suggest parentheses around && within ||".
      f867c8e8
    • Martin Storsjö's avatar
      [libcxxabi] Fix layout of __cxa_exception for win64 · 09dc884e
      Martin Storsjö authored
      Win64 isn't LP64, it's LLP64, but there's no __LLP64__ predefined -
      just check _WIN64 in addition to __LP64__.
      
      This fixes compilation after static asserts about the struct layout
      were added in f2a43605.
      
      Differential Revision: https://reviews.llvm.org/D73838
      09dc884e
    • Martin Storsjö's avatar
      [OpenMP] Fix GCC warnings. NFC. · 2dc45bf3
      Martin Storsjö authored
      Remove an extra semicolon, and add llvm_unreachable to avoid warnings
      about control reaching the end of a non-void function.
      2dc45bf3