Skip to content
  1. Jun 08, 2021
    • Nick Desaulniers's avatar
      [IR] make -stack-alignment= into a module attr · 433c8d95
      Nick Desaulniers authored
      Similar to D102742, specifying the stack alignment via CodegenOpts means
      that this flag gets dropped during LTO, unless the command line is
      re-specified as a plugin opt. Instead, encode this information as a
      module level attribute so that we don't have to expose this llvm
      internal flag when linking the Linux kernel with LTO.
      
      Looks like external dependencies might need a fix:
      * https://github.com/llvm-hs/llvm-hs/issues/345
      * https://github.com/halide/Halide/issues/6079
      
      Link: https://github.com/ClangBuiltLinux/linux/issues/1377
      
      Reviewed By: tejohnson
      
      Differential Revision: https://reviews.llvm.org/D103048
      433c8d95
    • David Blaikie's avatar
      NFC: .clang-tidy: Inherit configs from parents to improve maintainability · c5d56fec
      David Blaikie authored
      In the interests of disabling misc-no-recursion across LLVM (this seems
      like a stylistic choice that is not consistent with LLVM's
      style/development approach) this NFC preliminary change adjusts all the
      .clang-tidy files to inherit from their parents as much as possible.
      
      This change specifically preserves all the quirks of the current configs
      in order to make it easier to review as NFC.
      
      I validatad the change is NFC as follows:
      
      for X in `cat ../files.txt`;
      do
        mkdir -p ../tmp/$(dirname $X)
        touch $(dirname $X)/blaikie.cpp
        clang-tidy -dump-config $(dirname $X)/blaikie.cpp > ../tmp/$(dirname $X)/after
        rm $(dirname $X)/blaikie.cpp
      done
      
      (similarly for the "before" state, without this patch applied)
      
      for X in `cat ../files.txt`;
      do
        echo $X
        diff \
          ../tmp/$(dirname $X)/before \
          <(cat ../tmp/$(dirname $X)/after \
            | sed -e "s/,readability-identifier-naming\(.*\),-readability-identifier-naming/\1/" \
            | sed -e "s/,-llvm-include-order\(.*\),llvm-include-order/\1/" \
            | sed -e "s/,-misc-no-recursion\(.*\),misc-no-recursion/\1/" \
            | sed -e "s/,-clang-diagnostic-\*\(.*\),clang-diagnostic-\*/\1/")
      done
      
      (using sed to strip some add/remove pairs to reduce the diff and make it easier to read)
      
      The resulting report is:
        .clang-tidy
        clang/.clang-tidy
        2c2
        < Checks:          'clang-diagnostic-*,clang-analyzer-*,-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,-misc-non-private-member-variables-in-classes,-readability-identifier-naming,-misc-no-recursion'
        ---
        > Checks:          'clang-diagnostic-*,clang-analyzer-*,-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,-misc-non-private-member-variables-in-classes,-misc-no-recursion'
        compiler-rt/.clang-tidy
        2c2
        < Checks:          'clang-diagnostic-*,clang-analyzer-*,-*,clang-diagnostic-*,llvm-*,-llvm-header-guard,misc-*,-misc-unused-parameters,-misc-non-private-member-variables-in-classes'
        ---
        > Checks:          'clang-diagnostic-*,clang-analyzer-*,-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,-misc-non-private-member-variables-in-classes,-llvm-header-guard'
        flang/.clang-tidy
        2c2
        < Checks:          'clang-diagnostic-*,clang-analyzer-*,-*,llvm-*,-llvm-include-order,misc-*,-misc-no-recursion,-misc-unused-parameters,-misc-non-private-member-variables-in-classes'
        ---
        > Checks:          'clang-diagnostic-*,clang-analyzer-*,-*,llvm-*,misc-*,-misc-unused-parameters,-misc-non-private-member-variables-in-classes,-llvm-include-order,-misc-no-recursion'
        flang/include/flang/Lower/.clang-tidy
        flang/include/flang/Optimizer/.clang-tidy
        flang/lib/Lower/.clang-tidy
        flang/lib/Optimizer/.clang-tidy
        lld/.clang-tidy
        lldb/.clang-tidy
        llvm/tools/split-file/.clang-tidy
        mlir/.clang-tidy
      
      The `clang/.clang-tidy` change is a no-op, disabling an option that was never enabled.
      The compiler-rt and flang changes are no-op reorderings of the same flags.
      
      (side note, the .clang-tidy file in parallel-libs is broken and crashes
      clang-tidy because it uses "lowerCase" as the style instead of "lower_case" -
      so I'll deal with that separately)
      
      Differential Revision: https://reviews.llvm.org/D103842
      c5d56fec
    • Louis Dionne's avatar
      [libc++] Remove the old HTML documentation · 491d0459
      Louis Dionne authored
      This commit finishes moving the <atomic> design documents to the RST
      documentation and removes the old documentation. https://libcxx.llvm.org
      is already pointing to the new documentation only now, so the removal of
      the old documentation is really a NFC.
      
      I went over the old documentation and I don't think we're leaving anything
      important behind - I think everything important was mentionned in the RST
      documentation anyway.
      491d0459
    • patacca's avatar
      Revert "[Polly][Isl] Removing nullptr constructor from C++ bindings. NFC." · f60ea691
      patacca authored
      This reverts commit be5e2fc7.
      
      This introduced a building error for polly. https://lab.llvm.org/buildbot#builders/10/builds/4951
      f60ea691
    • Simon Pilgrim's avatar
      [DAG] foldShuffleOfConcatUndefs - ensure shuffles of upper (undef) subvector... · 61a2d6bf
      Simon Pilgrim authored
      [DAG] foldShuffleOfConcatUndefs - ensure shuffles of upper (undef) subvector elements is undef (PR50609)
      
      shuffle(concat(x,undef),concat(y,undef)) -> concat(shuffle(x,y),shuffle(x,y))
      
      If the original shuffle references any of the upper (undef) subvector elements, ensure the split shuffle masks uses undef instead of an out-of-bounds value.
      
      Fixes PR50609
      61a2d6bf
    • Whitney Tsang's avatar
      [LoopNest] Fix Wdeprecated-copy warnings · dee1f0cb
      Whitney Tsang authored
      error: definition of implicit copy constructor for 'LoopNest' is
      deprecated because it has a user-declared copy assignment operator
      [-Werror,-Wdeprecated-copy]
        LoopNest &operator=(const LoopNest &) = delete;
      
      Reviewed By: Meinersbur
      
      Differential Revision: https://reviews.llvm.org/D103752
      dee1f0cb
    • Yaxun (Sam) Liu's avatar
      [CUDA][HIP] Fix store of vtbl in ctor · 054cc3b1
      Yaxun (Sam) Liu authored
      vtbl itself is in default global address space. When clang emits
      ctor, it gets a pointer to the vtbl field based on the this pointer,
      then stores vtbl to the pointer.
      
      Since this pointer can point to any address space (e.g. an object
      created in stack), this pointer points to default address space, therefore
      the pointer to vtbl field in this object should also be in default
      address space.
      
      Currently, clang incorrectly casts the pointer to vtbl field in this object
      to global address space. This caused assertions in backend.
      
      This patch fixes that by removing the incorrect addr space cast.
      
      Reviewed by: Artem Belevich
      
      Differential Revision: https://reviews.llvm.org/D103835
      054cc3b1
    • Guillaume Chatelet's avatar
    • patacca's avatar
      [Polly][Isl] Removing nullptr constructor from C++ bindings. NFC. · be5e2fc7
      patacca authored
      [Polly][Isl] Removing nullptr constructor from C++ bindings. NFC.
      
      This is part of an effort to reduce the differences between the custom C++ bindings used right now by polly in `lib/External/isl/include/isl/isl-noxceptions.h` and the official isl C++ interface.
      
      Changes made:
       - Removed `std::nullptr_t` constructor from all the classes in the isl C++ bindings.
       - `isl-noexceptions.h` has been generated by this https://github.com/patacca/isl/commit/a7e00bea38f251a4bcf5c2c6ce5fa7ee5f661528
      
      Reviewed By: Meinersbur
      
      Differential Revision: https://reviews.llvm.org/D103751
      be5e2fc7
    • Guillaume Chatelet's avatar
      [llvm] Make Sequence reverse-iterable · e772216e
      Guillaume Chatelet authored
      This patch simplifies the implementation of Sequence and makes it compatible with llvm::reverse.
      It exposes the reverse iterators through rbegin/rend which prevents a dangling reference in std::reverse_iterator::operator++().
      
      Differential Revision: https://reviews.llvm.org/D102679
      e772216e
    • Hans Wennborg's avatar
      Revert "3rd Reapply "[DebugInfo] Use variadic debug values to salvage BinOps... · 386b66b2
      Hans Wennborg authored
      Revert "3rd Reapply "[DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands""
      
      > This reapplies c0f3dfb9, which was reverted following the discovery of
      > crashes on linux kernel and chromium builds - these issues have since
      > been fixed, allowing this patch to re-land.
      
      This reverts commit 36ec97f7.
      
      The change caused non-determinism in the compiler, see comments on the code
      review at https://reviews.llvm.org/D91722.
      
      Reverting to unbreak people's builds until that can be addressed.
      
      This also reverts the follow-up "[DebugInfo] Limit the number of values
      that may be referenced by a dbg.value" in
      a0bd6105.
      386b66b2
    • Fabian Schuiki's avatar
      [MLIR] Mark additional builtin attr methods const · 41eb2cec
      Fabian Schuiki authored
      * Mark the following methods const:
        * `ArrayAttr::getAsRange`
        * `ArrayAttr::getAsValueRange`
        * `DictionaryAttr::getAs`
      * Make `DictionarAttr::getAs` generic over the name class, such that
        `Identifier` and `StringRef` arguments get forwarded to the underlying
        call to `get`. (Made generic to avoid introducing a dependency on
        `include/mlir/IR/Identifier.h` as per the diff discussion.)
      
      Reviewed By: rriddle
      
      Differential Revision: https://reviews.llvm.org/D103822
      41eb2cec
    • Simon Moll's avatar
      [VP] getDeclarationForParams · 0f9d2991
      Simon Moll authored
      `VPIntrinsic::getDeclarationForParams` creates a vp intrinsic
      declaration for parameters you want to call it with.  This is in
      preparation of a new builder class that makes emitting vp intrinsic code
      nearly as convenient as using a plain ir builder (aka `VectorBuilder`,
      to be used by D99750).
      
      Reviewed By: frasercrmck, craig.topper, vkmr
      
      Differential Revision: https://reviews.llvm.org/D102686
      0f9d2991
    • Timm Bäder's avatar
      [NFC] Remove some include cycles · 22875b2c
      Timm Bäder authored
      These files include themselves directly.
      22875b2c
    • Simon Moll's avatar
      [VE][NFC] IRBuilder<> -> IRBuilderBase · 2b626aba
      Simon Moll authored
      VE's TTI broke with the switch from IRBuilder<> to IRBuilderBase.
      Following that change to compile again.
      2b626aba
    • Nathan Sidwell's avatar
      [clang] p1099 using enum part 1 · 012898b9
      Nathan Sidwell authored
      This adds support for p1099's 'using SCOPED_ENUM::MEMBER;'
      functionality, bringing a member of an enumerator into the current
      scope. The novel feature here, is that there need not be a class
      hierarchical relationship between the current scope and the scope of
      the SCOPED_ENUM. That's a new thing, the closest equivalent is a
      typedef or alias declaration. But this means that
      Sema::CheckUsingDeclQualifier needs adjustment. (a) one can't call it
      until one knows the set of decls that are being referenced -- if
      exactly one is an enumerator, we're in the new territory. Thus it
      needs calling later in some cases. Also (b) there are two ways we hold
      the set of such decls. During parsing (or instantiating a dependent
      scope) we have a lookup result, and during instantiation we have a set
      of shadow decls. Thus two optional arguments, at most one of which
      should be non-null.
      
      Differential Revision: https://reviews.llvm.org/D100276
      012898b9
    • maekawatoshiki's avatar
      [LoopUnrollAndJam] Change LoopUnrollAndJamPass to LoopNest pass · 09e92c60
      maekawatoshiki authored
      This patch changes LoopUnrollAndJamPass from FunctionPass to LoopNest pass.
      The next patch will utilize LoopNest to effectively handle loop nests.
      
      Also, a crash problem on legacy pass manager is fixed.
      
      Reviewed By: Whitney
      
      Differential Revision: https://reviews.llvm.org/D99149
      09e92c60
    • Vignesh Balasubramanian's avatar
      [OpenMP][OMPD] Implementation of OMPD debugging library - libompd. · f61602b0
      Vignesh Balasubramanian authored
      This is the first of seven patches that implements OMPD, a debugging interface to support debugging of OpenMP programs.
      It contains support code required in "openmp/runtime" for OMPD implementation.
      
      Reviewed By: @hbae
      Differential Revision: https://reviews.llvm.org/D100181
      f61602b0
    • Kerry McLaughlin's avatar
      [CostModel] Return an invalid cost for memory ops with unsupported types · 5db52751
      Kerry McLaughlin authored
      Fixes getTypeConversion to return `TypeScalarizeScalableVector` when a scalable vector
      type cannot be legalized by widening/splitting. When this is the method of legalization
      found, getTypeLegalizationCost will return an Invalid cost.
      
      The getMemoryOpCost, getMaskedMemoryOpCost & getGatherScatterOpCost functions already call
      getTypeLegalizationCost and will now also return an Invalid cost for unsupported types.
      
      Reviewed By: sdesmalen, david-arm
      
      Differential Revision: https://reviews.llvm.org/D102515
      5db52751
    • Sven van Haastregt's avatar
      [OpenCL] Add memory_scope_all_devices · d54e7b73
      Sven van Haastregt authored
      Add the `memory_scope_all_devices` enum value, which is restricted to
      OpenCL 3.0 or newer and the `__opencl_c_atomic_scope_all_devices`
      feature.  Also guard `memory_scope_all_svm_devices` accordingly, which
      is already available in OpenCL 2.0.
      
      The `__opencl_c_atomic_scope_all_devices` feature is header-only, so
      set its define to 1 in `opencl-c-base.h`.  This is done
      unconditionally at the moment, as the mechanism for disabling
      header-only options hasn't been decided yet.
      
      This patch only adds a negative test for now.  Ideally adding a CL3.0
      run line to atomic-ops.cl should suffice as a positive test, but we
      cannot do that yet until (at least) generic address spaces and program
      scope variables are supported in OpenCL 3.0 mode.
      
      Differential Revision: https://reviews.llvm.org/D103241
      d54e7b73
    • Fraser Cormack's avatar
    • Caroline Concatto's avatar
      [InstCombine] Add instcombine fold for extractelement + splat for scalable vectors · 6fd1604d
      Caroline Concatto authored
      This patch allows that scalable vector can also use the fold that already
      exists for fixed vector, only when the lane index is lower than the minimum
      number of elements of the vector.
      
      Differential Revision: https://reviews.llvm.org/D102404
      6fd1604d
    • Simon Pilgrim's avatar
      OptBisect.cpp - remove unused include. NFCI. · f96b5e80
      Simon Pilgrim authored
      StringRef.h is included in OptBisect.h and we have no uses of std::string.
      f96b5e80
    • Simon Pilgrim's avatar
      [CostModel][X86] Improve AVX1/AVX2 truncation costs · 49d3a367
      Simon Pilgrim authored
      Based off the worse case numbers generated by D103695, we were overestimating the cost of a number of vector truncations:
      
      AVX2: v2i32->v2i8, v2i64->v2i16 + v4i64->v4i32
      AVX1: v2i32->v2i8, v4i64->v4i16 + v16i16->v16i8
      
      Once we have a working set of conversion costs, the intention is to cleanup the tables and use legalized types a lot more to reduce the number of entries we currently have.
      49d3a367
    • Simon Pilgrim's avatar
    • Simon Pilgrim's avatar
    • Simon Pilgrim's avatar
    • Kerry McLaughlin's avatar
      [LoopVectorize] Don't use strict reductions when reordering is allowed · 14eeccfe
      Kerry McLaughlin authored
      If the `-enable-strict-reductions` flag is set to true, then currently we will
      always choose to vectorize the loop with strict in-order reductions. This is
      not necessary where we allow the reordering of FP operations, such as
      when loop hints are passed via metadata.
      
      This patch moves useOrderedReductions so that we can also check whether
      loop hints allow reordering, in which case we should use the default
      behaviour of vectorizing with unordered reductions.
      
      Reviewed By: sdesmalen
      
      Differential Revision: https://reviews.llvm.org/D103814
      14eeccfe
    • Alex Zinenko's avatar
      [mlir] fix shared-libs build · 7116468c
      Alex Zinenko authored
      7116468c
    • David Green's avatar
      [DAG] Allow isNullOrNullSplat to see truncated zeroes · b889c6ee
      David Green authored
      This sets the AllowTruncation flag on isConstOrConstSplat in
      isNullOrNullSplat, allowing it to see truncated constant zeroes on
      architectures such as AArch64, where only a i32.i64 are legal. As a
      truncation of 0 is always 0, this should always be valid, allowing some
      extra folding to happen including some of the cases from D103755.
      
      Differential Revision: https://reviews.llvm.org/D103756
      b889c6ee
    • Martin Storsjö's avatar
      [clang] Apply MS ABI details on __builtin_ms_va_list on non-windows platforms on x86_64 · b34da6ff
      Martin Storsjö authored
      This fixes inconsistencies in the ms_abi.c testcase.
      
      Also add a couple cases of missing double pointers in the windows part
      of the testcase; the outcome of building that testcase on windows hasn't
      changed, but the previous form of the test was imprecise (checking
      for "%[[STRUCT_FOO]]*" when clang actually generates "%[[STRUCT_FOO]]**"),
      which still used to match.
      
      Ideally this would share code with the native Windows case, but
      X86_64ABIInfo and WinX86_64ABIInfo aren't superclasses/subclasses of
      each other so it's impractical, and the code to share currently only
      consists of a couple lines.
      
      Differential Revision: https://reviews.llvm.org/D103837
      b34da6ff
    • Alex Zinenko's avatar
      [mlir] support memref of memref in standard-to-llvm conversion · c59ce1f6
      Alex Zinenko authored
      Now that memref supports arbitrary element types, add support for memref of
      memref and make sure it is properly converted to the LLVM dialect. The type
      support itself avoids adding the interface to the memref type itself similarly
      to other built-in types. This allows the shape, and therefore byte size, of the
      memref descriptor to remain a lowering aspect that is easier to customize and
      evolve as opposed to sanctifying it in the data layout specification for the
      memref type itself.
      
      Factor out the code previously in a testing pass to live in a dedicated data
      layout analysis and use that analysis in the conversion to compute the
      allocation size for memref of memref. Other conversions will be ported
      separately.
      
      Depends On D103827
      
      Reviewed By: rriddle
      
      Differential Revision: https://reviews.llvm.org/D103828
      c59ce1f6
    • Alex Zinenko's avatar
      [mlir] Make MemRef element type extensible · ada9aa5a
      Alex Zinenko authored
      Historically, MemRef only supported a restricted list of element types that
      were known to be storable in memory. This is unnecessarily restrictive given
      the open nature of MLIR's type system. Allow types to opt into being used as
      MemRef elements by implementing a type interface. For now, the interface is
      merely a declaration with no methods. Later, methods to query, e.g., the type
      size or whether a type can alias elements of another type may be added.
      
      Harden the "standard"-to-LLVM conversion against memrefs with non-builtin
      types.
      
      See https://llvm.discourse.group/t/rfc-memref-of-custom-types/3558.
      
      Depends On D103826
      
      Reviewed By: rriddle
      
      Differential Revision: https://reviews.llvm.org/D103827
      ada9aa5a
    • Alex Zinenko's avatar
      [mlir] fix integer type mismatch in alloc conversion to LLVM · 3c70a82e
      Alex Zinenko authored
      Some places in the alloc-like op conversion use the converted index type
      whereas other places use the pointer-sized integer type, which may not be the
      same. Consistently use the converted index type, similarly to other address
      calculations.
      
      Reviewed By: pifon2a
      
      Differential Revision: https://reviews.llvm.org/D103826
      3c70a82e
    • Javier Setoain's avatar
      Revert "[mlir][ArmSVE] Add basic mask generation operations" · 57546f5b
      Javier Setoain authored
      This reverts commit 392af6a7
      57546f5b
    • Lang Hames's avatar
    • David Spickett's avatar
      [lldb] Set return status to failed when adding a command error · e05b03cf
      David Spickett authored
      There is a common pattern:
      result.AppendError(...);
      result.SetStatus(eReturnStatusFailed);
      
      I found that some commands don't actually "fail" but only
      print "error: ..." because the second line got missed.
      
      This can cause you to miss a failed command when you're
      using the Python interface during testing.
      (and produce some confusing script results)
      
      I did not find any place where you would want to add
      an error without setting the return status, so just
      set eReturnStatusFailed whenever you add an error to
      a command result.
      
      This change does not remove any of the now redundant
      SetStatus. This should allow us to see if there are any
      tests that have commands unexpectedly fail with this change.
      (the test suite passes for me but I don't have access to all
      the systems we cover so there could be some corner cases)
      
      Some tests that failed on x86 and AArch64 have been modified
      to work with the new behaviour.
      
      Differential Revision: https://reviews.llvm.org/D103701
      e05b03cf
    • Tomasz Miąsko's avatar
      [Demangle][Rust] Parse const backreferences · f9a79356
      Tomasz Miąsko authored
      Reviewed By: dblaikie
      
      Differential Revision: https://reviews.llvm.org/D103848
      f9a79356
    • Tomasz Miąsko's avatar
      [Demangle][Rust] Parse type backreferences · 44d63c57
      Tomasz Miąsko authored
      Reviewed By: dblaikie
      
      Differential Revision: https://reviews.llvm.org/D103847
      44d63c57
    • Tomasz Miąsko's avatar
      [Demangle][Rust] Parse path backreferences · 82b7e822
      Tomasz Miąsko authored
      Reviewed By: dblaikie
      
      Differential Revision: https://reviews.llvm.org/D103459
      82b7e822
Loading