1. Feb 16, 2024
    • Jonas Devlieghere's avatar
      [lldb] Fix and rename skipIfHostIncompatibleWithRemote · bf93f4b8
      Jonas Devlieghere authored
      Fix and rename the broken and confusingly named decorator
      skipIfHostIncompatibleWithRemote. The decorator is meant to skip test
      which uses the inferior test build system (i.e. to build test inferiors)
      to build host binaries (e.g. lldb drivers).
      
      The decorator was broken on macOS, where the host and target platform
      report macosx, but the decorator overwrote it with Darwin, resulting in
      tests incorrectly being skipped.
      
      The decorator was also missing on a handful of tests that use the
      buildDriver helper, which this commit fixes as well.
      bf93f4b8
    • Eikansh Gupta's avatar
      [InstCombine] Do not simplify lshr/shl arg if it is part of a rotate pattern · 3363d23b
      Eikansh Gupta authored
      fshl/fshr having first two arguments as same gets lowered to target
      specific rotate. But based on the uses, one of the arguments can get
      simplified resulting in different arguments performing equivalent
      operation.
      
      This patch prevents the simplification of the arguments of lshr/shl if
      they are part of fshl pattern.
      
      Closes https://github.com/llvm/llvm-project/pull/73441.
      3363d23b
    • Eikansh Gupta's avatar
      3d81d483
    • Eikansh Gupta's avatar
      [InstCombine] Extract helper from matchFunnelShift (NFC) · db870cfc
      Eikansh Gupta authored
      The matchFunnelShift function was doing pattern matching and creating
      the fshl/fshr instruction if needed. Moved the pattern matching code to
      function convertOrOfShiftsToFunnelShift. It can be reused for other
      optimizations.
      db870cfc
    • Guillaume Chatelet's avatar
      [reland][libc][NFC] Use user defined literals to build 128 and 256 bit constants (#81998) · a80a01fc
      Guillaume Chatelet authored
      - #81835
      - Fix for platforms where uint64_t is not available
      a80a01fc
    • Anton Lydike's avatar
      [mlir] Reland "Initial patch to add an MPI dialect" (#81975) · b334664f
      Anton Lydike authored
      This patch introduces the new MPI dialect into MLIR. The Message Passing
      Interface (MPI) is a widely-used standard for distributed programs to
      exchange data. This PR goes together with a talk later at today's LLVM
      Dev Meeting.
      
      This is just a first, small patch to get going and add the necessary
      base files, so that we can add more operations in further patches.
      
      Here's the documentation as generated by `ninja mlir-doc`:
      # 'mpi' Dialect
      
      This dialect models the Message Passing Interface (MPI), version 
      4.0. It is meant to serve as an interfacing dialect that is targeted
      by higher-level dialects. The MPI dialect itself can be lowered to 
      multiple MPI implementations and hide differences in ABI. The dialect
      models the functions of the MPI specification as close to 1:1 as
      possible
      while preserving SSA value semantics where it makes sense, and uses 
      `memref` types instead of bare pointers.
      
      This dialect is under active development, and while stability is an
      eventual goal, it is not guaranteed at this juncture. Given the early 
      state, it is recommended to inquire further prior to using this dialect.
      
      For an in-depth documentation of the MPI library interface, please refer
      to official documentation such as the 
      [OpenMPI online documentation](https://www.open-mpi.org/doc/current/).
      
      [TOC]
      
      ## Operation definition
      
      ### `mpi.comm_rank` (mpi::CommRankOp)
      
      _Get the current rank, equivalent to `MPI_Comm_rank(MPI_COMM_WORLD,
      &rank)`_
      
      
      Syntax:
      
      ```
      operation ::= `mpi.comm_rank` attr-dict `:` type(results)
      ```
      
      Communicators other than `MPI_COMM_WORLD` are not supported for now.
      
      This operation can optionally return an `!mpi.retval` value that can be
      used
      to check for errors.
      
      #### Results:
      
      | Result | Description |
      | :----: | ----------- |
      | `retval` | MPI function call return value
      | `rank` | 32-bit signless integer
      
      
      ### `mpi.error_class` (mpi::ErrorClassOp)
      
      _Get the error class from an error code, equivalent to the
      `MPI_Error_class` function_
      
      
      Syntax:
      
      ```
      operation ::= `mpi.error_class` $val attr-dict `:` type($val)
      ```
      
      `MPI_Error_class` maps return values from MPI calls to a set of
      well-known
      MPI error classes.
      
      #### Operands:
      
      | Operand | Description |
      | :-----: | ----------- |
      | `val` | MPI function call return value
      
      #### Results:
      
      | Result | Description |
      | :----: | ----------- |
      | `errclass` | MPI function call return value
      
      
      ### `mpi.finalize` (mpi::FinalizeOp)
      
      _Finalize the MPI library, equivalent to `MPI_Finalize()`_
      
      
      Syntax:
      
      ```
      operation ::= `mpi.finalize` attr-dict (`:` type($retval)^)?
      ```
      
      This function cleans up the MPI state. Afterwards, no MPI methods may 
      be invoked (excpet for MPI_Get_version, MPI_Initialized, and
      MPI_Finalized).
      Notably, MPI_Init cannot be called again in the same program.
      
      This operation can optionally return an `!mpi.retval` value that can be
      used
      to check for errors.
      
      #### Results:
      
      | Result | Description |
      | :----: | ----------- |
      | `retval` | MPI function call return value
      
      
      ### `mpi.init` (mpi::InitOp)
      
      _Initialize the MPI library, equivalent to `MPI_Init(NULL, NULL)`_
      
      
      Syntax:
      
      ```
      operation ::= `mpi.init` attr-dict (`:` type($retval)^)?
      ```
      
      This operation must preceed most MPI calls (except for very few
      exceptions,
      please consult with the MPI specification on these).
      
      Passing &argc, &argv is not supported currently.
      
      This operation can optionally return an `!mpi.retval` value that can be
      used
      to check for errors.
      
      #### Results:
      
      | Result | Description |
      | :----: | ----------- |
      | `retval` | MPI function call return value
      
      
      ### `mpi.recv` (mpi::RecvOp)
      
      _Equivalent to `MPI_Recv(ptr, size, dtype, dest, tag, MPI_COMM_WORLD,
      MPI_STATUS_IGNORE)`_
      
      
      Syntax:
      
      ```
      operation ::= `mpi.recv` `(` $ref `,` $tag `,` $rank `)` attr-dict `:` type($ref) `,` type($tag) `,` type($rank)(`->` type($retval)^)?
      ```
      
      MPI_Recv performs a blocking receive of `size` elements of type `dtype` 
      from rank `dest`. The `tag` value and communicator enables the library
      to
      determine the matching of multiple sends and receives between the same 
      ranks.
      
      Communicators other than `MPI_COMM_WORLD` are not supprted for now.
      The MPI_Status is set to `MPI_STATUS_IGNORE`, as the status object 
      is not yet ported to MLIR.
      
      This operation can optionally return an `!mpi.retval` value that can be
      used
      to check for errors.
      
      #### Operands:
      
      | Operand | Description |
      | :-----: | ----------- |
      | `ref` | memref of any type values
      | `tag` | 32-bit signless integer
      | `rank` | 32-bit signless integer
      
      #### Results:
      
      | Result | Description |
      | :----: | ----------- |
      | `retval` | MPI function call return value
      
      
      ### `mpi.retval_check` (mpi::RetvalCheckOp)
      
      _Check an MPI return value against an error class_
      
      
      Syntax:
      
      ```
      operation ::= `mpi.retval_check` $val `=` $errclass attr-dict `:` type($res)
      ```
      
      This operation compares MPI status codes to known error class
      constants such as `MPI_SUCCESS`, or `MPI_ERR_COMM`.
      
      #### Attributes:
      
      <table>
      <tr><th>Attribute</th><th>MLIR Type</th><th>Description</th></tr>
      
      <tr><td><code>errclass</code></td><td>::mlir::mpi::MPI_ErrorClassEnumAttr</td><td><details><summary>MPI
      error class name</summary>{{% markdown %}}Enum cases:
      * MPI_SUCCESS (`MPI_SUCCESS`)
      * MPI_ERR_ACCESS (`MPI_ERR_ACCESS`)
      * MPI_ERR_AMODE (`MPI_ERR_AMODE`)
      * MPI_ERR_ARG (`MPI_ERR_ARG`)
      * MPI_ERR_ASSERT (`MPI_ERR_ASSERT`)
      * MPI_ERR_BAD_FILE (`MPI_ERR_BAD_FILE`)
      * MPI_ERR_BASE (`MPI_ERR_BASE`)
      * MPI_ERR_BUFFER (`MPI_ERR_BUFFER`)
      * MPI_ERR_COMM (`MPI_ERR_COMM`)
      * MPI_ERR_CONVERSION (`MPI_ERR_CONVERSION`)
      * MPI_ERR_COUNT (`MPI_ERR_COUNT`)
      * MPI_ERR_DIMS (`MPI_ERR_DIMS`)
      * MPI_ERR_DISP (`MPI_ERR_DISP`)
      * MPI_ERR_DUP_DATAREP (`MPI_ERR_DUP_DATAREP`)
      * MPI_ERR_ERRHANDLER (`MPI_ERR_ERRHANDLER`)
      * MPI_ERR_FILE (`MPI_ERR_FILE`)
      * MPI_ERR_FILE_EXISTS (`MPI_ERR_FILE_EXISTS`)
      * MPI_ERR_FILE_IN_USE (`MPI_ERR_FILE_IN_USE`)
      * MPI_ERR_GROUP (`MPI_ERR_GROUP`)
      * MPI_ERR_INFO (`MPI_ERR_INFO`)
      * MPI_ERR_INFO_KEY (`MPI_ERR_INFO_KEY`)
      * MPI_ERR_INFO_NOKEY (`MPI_ERR_INFO_NOKEY`)
      * MPI_ERR_INFO_VALUE (`MPI_ERR_INFO_VALUE`)
      * MPI_ERR_IN_STATUS (`MPI_ERR_IN_STATUS`)
      * MPI_ERR_INTERN (`MPI_ERR_INTERN`)
      * MPI_ERR_IO (`MPI_ERR_IO`)
      * MPI_ERR_KEYVAL (`MPI_ERR_KEYVAL`)
      * MPI_ERR_LOCKTYPE (`MPI_ERR_LOCKTYPE`)
      * MPI_ERR_NAME (`MPI_ERR_NAME`)
      * MPI_ERR_NO_MEM (`MPI_ERR_NO_MEM`)
      * MPI_ERR_NO_SPACE (`MPI_ERR_NO_SPACE`)
      * MPI_ERR_NO_SUCH_FILE (`MPI_ERR_NO_SUCH_FILE`)
      * MPI_ERR_NOT_SAME (`MPI_ERR_NOT_SAME`)
      * MPI_ERR_OP (`MPI_ERR_OP`)
      * MPI_ERR_OTHER (`MPI_ERR_OTHER`)
      * MPI_ERR_PENDING (`MPI_ERR_PENDING`)
      * MPI_ERR_PORT (`MPI_ERR_PORT`)
      * MPI_ERR_PROC_ABORTED (`MPI_ERR_PROC_ABORTED`)
      * MPI_ERR_QUOTA (`MPI_ERR_QUOTA`)
      * MPI_ERR_RANK (`MPI_ERR_RANK`)
      * MPI_ERR_READ_ONLY (`MPI_ERR_READ_ONLY`)
      * MPI_ERR_REQUEST (`MPI_ERR_REQUEST`)
      * MPI_ERR_RMA_ATTACH (`MPI_ERR_RMA_ATTACH`)
      * MPI_ERR_RMA_CONFLICT (`MPI_ERR_RMA_CONFLICT`)
      * MPI_ERR_RMA_FLAVOR (`MPI_ERR_RMA_FLAVOR`)
      * MPI_ERR_RMA_RANGE (`MPI_ERR_RMA_RANGE`)
      * MPI_ERR_RMA_SHARED (`MPI_ERR_RMA_SHARED`)
      * MPI_ERR_RMA_SYNC (`MPI_ERR_RMA_SYNC`)
      * MPI_ERR_ROOT (`MPI_ERR_ROOT`)
      * MPI_ERR_SERVICE (`MPI_ERR_SERVICE`)
      * MPI_ERR_SESSION (`MPI_ERR_SESSION`)
      * MPI_ERR_SIZE (`MPI_ERR_SIZE`)
      * MPI_ERR_SPAWN (`MPI_ERR_SPAWN`)
      * MPI_ERR_TAG (`MPI_ERR_TAG`)
      * MPI_ERR_TOPOLOGY (`MPI_ERR_TOPOLOGY`)
      * MPI_ERR_TRUNCATE (`MPI_ERR_TRUNCATE`)
      * MPI_ERR_TYPE (`MPI_ERR_TYPE`)
      * MPI_ERR_UNKNOWN (`MPI_ERR_UNKNOWN`)
      * MPI_ERR_UNSUPPORTED_DATAREP (`MPI_ERR_UNSUPPORTED_DATAREP`)
      * MPI_ERR_UNSUPPORTED_OPERATION (`MPI_ERR_UNSUPPORTED_OPERATION`)
      * MPI_ERR_VALUE_TOO_LARGE (`MPI_ERR_VALUE_TOO_LARGE`)
      * MPI_ERR_WIN (`MPI_ERR_WIN`)
      * MPI_ERR_LASTCODE (`MPI_ERR_LASTCODE`){{% /markdown
      %}}</details></td></tr>
      </table>
      
      #### Operands:
      
      | Operand | Description |
      | :-----: | ----------- |
      | `val` | MPI function call return value
      
      #### Results:
      
      | Result | Description |
      | :----: | ----------- |
      | `res` | 1-bit signless integer
      
      
      ### `mpi.send` (mpi::SendOp)
      
      _Equivalent to `MPI_Send(ptr, size, dtype, dest, tag, MPI_COMM_WORLD)`_
      
      
      Syntax:
      
      ```
      operation ::= `mpi.send` `(` $ref `,` $tag `,` $rank `)` attr-dict `:` type($ref) `,` type($tag) `,` type($rank)(`->` type($retval)^)?
      ```
      
      MPI_Send performs a blocking send of `size` elements of type `dtype` to
      rank
      `dest`. The `tag` value and communicator enables the library to
      determine
      the matching of multiple sends and receives between the same ranks.
      
      Communicators other than `MPI_COMM_WORLD` are not supprted for now.
      
      This operation can optionally return an `!mpi.retval` value that can be
      used
      to check for errors.
      
      #### Operands:
      
      | Operand | Description |
      | :-----: | ----------- |
      | `ref` | memref of any type values
      | `tag` | 32-bit signless integer
      | `rank` | 32-bit signless integer
      
      #### Results:
      
      | Result | Description |
      | :----: | ----------- |
      | `retval` | MPI function call return value
      
      
      ## Attribute definition
      
      ### MPI_ErrorClassEnumAttr
      
      MPI error class name
      
      Syntax:
      
      ```
      #mpi.errclass<
        ::mlir::mpi::MPI_ErrorClassEnum   # value
      >
      ```
      
      Enum cases:
      * MPI_SUCCESS (`MPI_SUCCESS`)
      * MPI_ERR_ACCESS (`MPI_ERR_ACCESS`)
      * MPI_ERR_AMODE (`MPI_ERR_AMODE`)
      * ... *all other MPI error codes*
      
      #### Parameters:
      
      | Parameter | C++ type | Description |
      | :-------: | :-------: | ----------- |
      | value | `::mlir::mpi::MPI_ErrorClassEnum` | an enum of type
      MPI_ErrorClassEnum |
      
      ## Type definition
      
      ### RetvalType
      
      MPI function call return value
      
      Syntax: `!mpi.retval`
      
      This type represents a return value from an MPI function vall.
      This value can be MPI_SUCCESS, MPI_ERR_IN_STATUS, or any error code.
      
      This return value can be compared agains the known MPI error classes
      represented by `#mpi.errclass` using the `mpi.retval_check` operation.
      b334664f
    • lntue's avatar
      [libc][stdfix] Re-enable fixed point abs entry points. (#81995) · 10007eef
      lntue authored
      #80757 has been merged.
      10007eef
    • Boian Petkantchin's avatar
      [mlir][mesh] Dedublicate iterator type and partial type information (#81920) · ff2720d1
      Boian Petkantchin authored
      The two types duplicated mostly the same values.
      Here they are decomposed to carry orthogonal and complimentary
      information.
      
      Use `utils::IteratorType` instead of `mesh::IteratorType`. It now has
      only parallel and reduction values.
      
      Rename `Partial` to `ReductionKind`.
      
      Add `getReductionLoopIteratorKinds` method to `ShardingInterface`.
      ff2720d1
    • Timm Bäder's avatar
    • Florian Hahn's avatar
      [AArch64] Add extra stp suppression tests. · 35f3298e
      Florian Hahn authored
      Add test case for store suppression that still trigger after
      https://github.com/llvm/llvm-project/pull/81749
      35f3298e
    • Guillaume Chatelet's avatar
      [libc][NFC] Simplify BigInt (#81992) · 2b677fa4
      Guillaume Chatelet authored
      - Add a single `cmp` function to derive all comparison operators
       - Use the `friend` version of the member functions for symmetry
       - Add a `is_neg` function to factor sign extraction
       - Implement binary op through macro expansion
      2b677fa4
    • Hans Wennborg's avatar
      Revert "[lld] enable fixup chains by default (#79894)" · f55b79f5
      Hans Wennborg authored
      This caused links to fail with:
      
        lld/MachO/Symbols.cpp:97:
        virtual uint64_t lld::macho::Defined::getVA() const:
        Assertion `target->usesThunks()' failed.
      
      or crash when asserts are disabled. See comment on
      https://github.com/llvm/llvm-project/pull/79894
      
      > Enable chained fixups in lld when all platform and version criteria are
      > met. This is an attempt at simplifying the logic used in ld 907:
      >
      > https://github.com/apple-oss-distributions/ld64/blob/93d74eafc37c0558b4ffb88a8bc15c17bed44a20/src/ld/Options.cpp#L5458-L5549
      >
      > Some changes were made to simplify the logic:
      > - only enable chained fixups for macOS from 13.0 to avoid the arch check
      > - only enable chained fixups for iphonesimulator from 16.0 to avoid the
      > arch check
      > - don't enable chained fixups for not specifically listed platforms
      > - don't enable chained fixups for arm64_32
      
      This reverts commit 775c2856.
      f55b79f5
    • Florian Hahn's avatar
      [SROA] Use !tbaa instead of !tbaa.struct if op matches field. (#81289) · 53c0e809
      Florian Hahn authored
      If a split memory access introduced by SROA accesses precisely a single
      field of the original operation's !tbaa.struct, use the !tbaa tag for
      the accessed field directly instead of the full !tbaa.struct.
      
      InstCombine already had a similar logic.
      
      Motivation for this and follow-on patches is to improve codegen for
      libc++, where using memcpy limits optimizations, like vectorization for
      code iteration over std::vector<std::complex<float>>:
      https://godbolt.org/z/f3vqYos3c
      
      Depends on https://github.com/llvm/llvm-project/pull/81285.
      53c0e809
    • Timm Bäder's avatar
      [clang][Interp] Fix handling PointerToIntegral casts · 17d8a84c
      Timm Bäder authored
      We need to always emit the diagnostic, but still do the cast.
      This is also what the current interpreter does.
      17d8a84c
    • Florian Hahn's avatar
      [VPlan] Handle truncating ICMPs in truncateToMinimalBWs. · 0dacba3a
      Florian Hahn authored
      Update truncateToMinimalBitwidths to handle truncating ICMPs. For ICMPs,
      the new target type will be the same as the original type. In that case,
      only truncate the operands, but skip the extend. This is in line with
      what the original truncateToMinimalBitwidths did for compares.
      
      Fixes https://github.com/llvm/llvm-project/issues/81415.
      0dacba3a
    • Haojian Wu's avatar
    • Nico Weber's avatar
      [lld/MachO] Fix assert on unsorted data-in-code entries (#81758) · 624ea349
      Nico Weber authored
      When the data-in-code entries are in separate sections, they are not
      guaranteed to be sorted. In particular, 68b1cc36f3df marked some libc++
      string functions as noinline, which leads to global ctors involving
      strings now producing data-in-code sections in __TEXT,__StaticInit,
      which is why this now happens in practice.
      
      Since data-in-code entries are relatively rare and small, just sort
      them. No observed performance impact.
      
      See also crbug.com/41487860
      624ea349
    • Aaron Ballman's avatar
      [C++] Fix parsing of _Alignas in local declarations (#81915) · c2fea4cf
      Aaron Ballman authored
      We support '_Alignas' from C11 as an extension in C++. However, we were
      not correctly parsing its use in local variable declarations. This patch
      addresses that issue.
      c2fea4cf
    • Shilei Tian's avatar
      2e585c48
    • Hirofumi Nakamura's avatar
      [clang-format] Support of TableGen basic format restrictions. (#81611) · 8c1c94e8
      Hirofumi Nakamura authored
      - Allow/force to break the line or not.
      - Allow/force to insert space or not.
      8c1c94e8
    • Haojian Wu's avatar
      [bazel] Port for 0eedc85b and... · bfda580b
      Haojian Wu authored
      [bazel] Port for 0eedc85b and 82a4a416
      bfda580b
    • Timm Bäder's avatar
      [clang][Interp] Lazily visit constant locals in C++ · a52c0c77
      Timm Bäder authored
      While we _do_ get them registered via visitInitializer(), they
      are still local, so gone on the next call to e.g. evaluateAsRValue().
      
      Visit them lazily, similarly like we do in C.
      a52c0c77
    • Benjamin Maxwell's avatar
    • Timm Bäder's avatar
      [clang][Interp][NFC] Check pointer compound assign operators for errors · f06e07be
      Timm Bäder authored
      This needs to be done but we didn't use to do it.
      f06e07be
    • Hsiangkai Wang's avatar
      [mlir][vectorize] Support affine.apply in SuperVectorize (#77968) · 181d9602
      Hsiangkai Wang authored
      We have no need to vectorize affine.apply inside the vectorizing loop.
      However, we still need to generate it in the original scalar form. We
      have to replace all its operands with the generated scalar operands in
      the vectorizing loop, e.g., induction variables.
      181d9602
    • Simon Pilgrim's avatar
      [Transforms][Utils] Add helpers to map between Reduction IntrinsicID and... · 2ed2a3ad
      Simon Pilgrim authored
      [Transforms][Utils] Add helpers to map between Reduction IntrinsicID and Arithmetic Instruction Opcode and MinMax IntrinsicID / RecurKind
      
      Noticed on #81852
      2ed2a3ad
    • Pierrick Bouvier's avatar
    • J. Ryan Stinnett's avatar
      [Docs] Fix large vertical space at top of pages (#81599) · c681ea66
      J. Ryan Stinnett authored
      This fixes a large vertical blank space at the top of the page that was caused
      by the floating sidebar.
      c681ea66
    • Ulrich Weigand's avatar
      [docs][llvm-objcopy] Add missing formats (#81981) · bf471c91
      Ulrich Weigand authored
      Bring list of supported formats in docs back in sync with the code.
      bf471c91
    • Timm Bäder's avatar
      [clang][Interp] Check variable initialization in Ret op · 2e43ca49
      Timm Bäder authored
      Just like we did with the l-to-r conversion, we need to do this
      while the data is still alive.
      2e43ca49
    • Ulrich Weigand's avatar
      [llvm-objcopy] Add SystemZ support (#81841) · 3c02cb74
      Ulrich Weigand authored
      This is also necessary for enabling ClangBuiltLinux:
      https://github.com/ClangBuiltLinux/linux/issues/1530
      3c02cb74
    • Rainer Orth's avatar
      [asan] Intercept __makecontext_v2 on Solaris/SPARC (#81588) · 8c203371
      Rainer Orth authored
      As detailed in [GCC PR
      sanitizer/113785](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113785),
      the GCC test `c-c++-common/asan/swapcontext-test-1.c` `FAIL`s on
      Solaris/sparc.
      
      This is due to the fact that Solaris 10/SPARC changed the semantics of
      `makecontext` so `ucontext_t.uc_stack.ss_sp` refers to the stack base
      address. To maintain binary compatiblity, the external name was changed
      to `__makecontext_v2`, keeping the old version.
      
      To match this, `__makecontext_v2` needs to be intercepted instead of
      `makecontext`.
      
      Tested on GCC trunk on `sparc-sun-solaris2.11`, `i386-pc-solaris2.11`,
      and `x86_64-pc-linux-gnu`.
      
      Also tested on the same targets on LLVM `main`. However, this only
      proves that Linux/x86_64 isn't broken, since all `makecontext` tests are
      Linux-specific.
      8c203371
    • Florian Hahn's avatar
      [TBAA] Only clear TBAAStruct if field can be extracted. (#81285) · 3b6e2504
      Florian Hahn authored
      Retain TBAAStruct if we fail to match the access to a single field. All
      users at the moment use this when using the full size of the original
      access. SROA also retains the original TBAAStruct when accessing parts
      at offset 0.
      
      Motivation for this and follow-on patches is to improve codegen for
      libc++, where using memcpy limits optimizations, like vectorization for
      code iteration over std::vector<std::complex<float>>:
      https://godbolt.org/z/f3vqYos3c
      
      Depends on https://github.com/llvm/llvm-project/pull/81284
      3b6e2504
    • Owen Pan's avatar
      [clang-format] Delete a redundant newline at the end of a test case · 92ef4087
      Owen Pan authored
      It slipped in from commit fa6025e2.
      92ef4087
    • Jay Foad's avatar
      [AMDGPU] Set DecoderNamespace consistently for GFX10+ MIMG instructions (#81881) · 8ba915fe
      Jay Foad authored
      This was done inconsistently before. Many instructions used the default
      "AMDGPU" namespace which I would like to remove.
      8ba915fe
    • Matthias Springer's avatar
      [mlir][sparse] Fix memory leaks (part 1) (#81843) · b6c453c1
      Matthias Springer authored
      This commit fixes memory leaks in sparse tensor integration tests by
      adding `bufferization.dealloc_tensor` ops.
      
      Note: Buffer deallocation will be automated in the future with the
      ownership-based buffer deallocation pass, making `dealloc_tensor`
      obsolete (only codegen path, not when using the runtime library).
      b6c453c1
    • Jay Foad's avatar
    • Jason Molenda's avatar
      Fix help doc for 'enable-background-lookup' obsolete setting · 4cf458c6
      Jason Molenda authored
      The setting name that was settled on is symbols.auto-download.
      4cf458c6
    • jeanPerier's avatar
      [flang] Do not leave length parameters uninitialized in descriptor addendums (#81858) · d26a6464
      jeanPerier authored
      Descriptor addendum have a field to hold length parameters (currently
      only one). This field is currently never used because flang does not
      lowered derived types with length parameters.
      
      However, leaving it uninitialized is causing bugs in code like gFTL
      where the code is trying to sort POINTERs (see [1]). More precisely, it
      is an issue when two pointers should compare equal (same base address),
      because the uninitialized values in the addendum may differ depending on
      the "stack history" and optimization level.
      
      Always initialized the length parameters field in the addendum to zero.
      
      [1]:
      https://github.com/Goddard-Fortran-Ecosystem/gFTL/blob/dc93a5fc2fe2b487590580d9f0a17d77ca3fe5c1/include/v1/templates/set_impl.inc#L312
      
      The type being transferred to an integer array may look like:
      
      ```
         TYPE :: localwrapper
          TYPE(T), POINTER :: item
         END TYPE localwrapper
      ```
      
      Which in flang case ends-up transferring a descriptor to an integer
      array, the code in gFTL later compare the integer arrays. This logic is
      used when building set data structures in gFTL.
      d26a6464
    • Balázs Kéri's avatar
      [clang][analyzer] Simplify code of StreamChecker (NFC). (#79312) · 42b5037c
      Balázs Kéri authored
      A class is added that contains common functions and data members that are used in many of the "eval" functions. This results in shorter "eval" functions and less code repetition.
      42b5037c