1. Feb 24, 2024
  2. Feb 23, 2024
    • Lukacma's avatar
      [AArch64][SVE] Add intrinsincs to assembly mapping for svpmov (#81861) · 08cb1a62
      Lukacma authored
      This patch enables translation of svpmov intrinsic to the correct
      assembly instruction, instead of function call.
      08cb1a62
    • Matthias Springer's avatar
    • Michael Maitland's avatar
      [RISCV][NFC] Allow SchedVar to be a def inside our scheduler model files. (#82634) · be083dba
      Michael Maitland authored
      All SchedModel files have a line that looks like:
      
      ```
      def SomeModel : SchedMachineModel;
      let SchedModel = SomeModel in {
        ...
      }
      ```
      
      TableGen requires that all records defined within the top level `let`
      must have a field `SchedModel` somewhere in their nested record
      hierarchy (i.e. the record has a field `SchedModel : SchedMachineModel`
      or recursively, one of its members has a field `SchedModel :
      SchedMachineModel`).
      
      Classes such as `SchedPredicate` have added a field `SchedModel :
      SchedMachineModel`, even though the field is never used, just to supress
      **errors** (not warnings) caused from having the top level let in the
      model files. This decision was made to avoid having hundreds of the same
      `let` statement littered in every scheduler model file.
      
      The reason we have never seen an error for `SchedVar` before is because
      `SchedVar` is never instantiated with a `def`. Instead, it is only
      created as a value that is consumed by `SchedWriteVariant`:
      
      ```
      ... : SchedWriteVariant<[SchedVar<...>, SchedVar<...>]>;
      ```
      
      There is a problem with this style of instantiation. In particular, the
      problem arises as we try to take a class based approach to building
      scheduler models. I will describe the problem from the bottom up.
      
      The `LMULWriteResMXVariant` multiclass takes in a `SchedPredicateBase
      Pred`. Today, the RISCVSchedSiFive7.td file defines `VLDSX0Pred` outside
      the scope of any class. That means that `VLDSX0Pred` exists before
      `LMULWriteResMXVariant` multiclass is instantiated. With this approach,
      there is no error since the predicate is instantated in entirety before
      the variant multiclass is instantiated. However, I have the intention to
      move the definition of both the predicate and the variant multiclass
      records inside a multiclass to factor out common parts between multiple
      scheduler models.
      
      I plan to have something like:
      
      ```
      multiclass SiFive7Base<SiFive7BaseConfig c> {
        def VLDSX0Pred : ...;
        // Need defvar since record is prefixed with NAME.
        defvar VLDSX0Pred = !cast<...>(NAME # VLDSX0Pred);
        defm SiFive7 : LMULWriteResMXVariant<VLDSX0Pred>;
      }
      
      defm "SiFive7Version1" : SiFive7Base<SiFive7BaseConfig<...>>;
      defm "SiFive7Version2" : SiFive7Base<SiFive7BaseConfig<...>>;
      ```
      
      In this scheme, VLDSX0Pred is defined within the same multiclass
      transaction that the `LMULWriteResMXVariant` is defined in. For some
      reason, TableGen does not allow `Values` to reference records that were
      created in the same parent record construction. If the `SchedVar` is not
      a `def`, then it will not be able to find the record `NAME #
      VLDSX0Pred`. Making it a def, allows TableGen to find `NAME #
      VLDSX0Pred` in scope.
      
      The simplest example of this is:
      
      ```
      class A {}
      class B<A a> { A x = a;}
      class C<B b> { B y = b;}
      multiclass D {
        def MyA : A;
        defvar aa = !cast<A>(NAME # MyA);
        // This works
        def : B<aa>;
        // This does not work because constructing B by value cannot find `NAME # MyA`
        // error: Undefined reference to record: 'MyA'
        def : C<B<aa>>;
        // To fix it, define it like such:
        def MyB : B<aa>;
        defvar bb = !cast<B>(NAME # MyB);
        def : C<bb>;
      }
      defm "" : D;
      ```
      
      In summary, in order to use a class based approach to creating scheduler
      resources to promote resusability, `SchedVar`s must be created using
      defs instead of being instantiated by value so that it can resolve
      records that were part of the instantiation of the parent record being
      created. In order to do this without refactoring the top level `let`
      statement that all scheduler model files use, we add an unused field
      `SchedModel : SchedMachineModel` to `SchedVar`, similiar to what has
      been done in `SchedPredicate`.
      be083dba
    • Benoît Amiaux's avatar
      build_llvm_release.bat: add tarball export to x64 release (#79840) · 52ada07e
      Benoît Amiaux authored
      Like linux releases, export a tar.xz files containing most llvm tools,
      including non toolchain utilities, llvm-config, llvm-link and others.
      
      We do this by reconfiguring cmake one last time at the last step,
      running the install target so we do not need to recompile anything.
      
      Fix #51192
      Fix #53052
      52ada07e
    • Orlando Cazalet-Hyams's avatar
      [RemoveDIs] Enable DPLabels conversion [3b/3] (#82639) · 71d47a0b
      Orlando Cazalet-Hyams authored
      Enables conversion between llvm.dbg.label and DPLabel.
      71d47a0b
    • hev's avatar
      c747b242
    • Joseph Huber's avatar
      [LLVM] Fix incorrect GPU triple detection for runtimes builds · b8a7d813
      Joseph Huber authored
      Summary:
      This block of code is used to prevent a GPU-based cross compiling build
      from taking incompatible arguments. However this incorrectly used the
      LLVM default triple instead of the runtimes target. Fix that so the bots
      can continue to default the triple to NVPTX.
      b8a7d813
    • Matthias Springer's avatar
      [mlir] Fix memory leaks after #81759 (#82762) · 492e8ba0
      Matthias Springer authored
      This commit fixes memory leaks that were introduced by #81759. The way
      ops and blocks are erased changed slightly.
      
      The leaks were caused by an incorrect implementation of op builders:
      blocks must be created with the supplied builder object. Otherwise, they
      are not properly tracked by the dialect conversion and can leak during
      rollback.
      492e8ba0
    • Timm Bäder's avatar
      [clang][Interp] Don't return success for already failed global variables · ad49fe3e
      Timm Bäder authored
      We might be visiting them more than once. We used to return true for
      second and subsequent cases, just because we had already visited it
      before.
      ad49fe3e
    • Abhina Sree's avatar
      [libcxx][test] Change UNSUPPORTED to XFAIL for target-related failures (#81513) · 1197fcab
      Abhina Sree authored
      This is a followup from this discussion
      https://github.com/llvm/llvm-project/pull/80735#discussion_r1486586017
      to mark targets that were initially marked as UNSUPPORTED with an XFAIL
      instead.
      1197fcab
    • Yingwei Zheng's avatar
      [ValueTracking] Handle more integer intrinsics in `propagatesPoison` (#82749) · 3b70387c
      Yingwei Zheng authored
      This patch extends `propagatesPoison` to handle more integer intrinsics.
      It will turn more logical ands/ors into bitwise ands/ors.
      
      See also https://reviews.llvm.org/D99671.
      3b70387c
    • tsitdikov's avatar
      Users/tsitdikov (#82757) · e09e0d52
      tsitdikov authored
      Fix Test ARM SME library and build rule.
      e09e0d52
    • r4nt's avatar
      [ClangFormat] Fix indent in child lines within a macro argument. (#82523) · ddb4450a
      r4nt authored
      When reconstructing lines from a macro expansion, make sure that lines
      at different levels in the expanded code get indented correctly as part
      of the macro argument.
      ddb4450a
    • Johannes Reifferscheid's avatar
      [MLIR] Expose approximation patterns for tanh/erf. (#82750) · bcf9826a
      Johannes Reifferscheid authored
      These patterns can already be used via
      populateMathPolynomialApproximationPatterns, but that includes a number
      of other patterns that may not be needed.
      
      There are already similar functions for expansion.
      
      For now only adding tanh and erf since I have a concrete use case for
      these two.
      bcf9826a
    • Sander de Smalen's avatar
      [Clang] Fix acle_sme_zero.c once more. · 3b3d0978
      Sander de Smalen authored
      3b3d0978
    • Garvit Gupta's avatar
      [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal (#81727) · f1e0392b
      Garvit Gupta authored
      The below culprit patch enabled the generation of asynchronous unwind
      tables (-funwind-tables=2) by default for RISCV for both linux and
      RISCVToolChain baremetal object. However, since there are 2 baremetal
      toolchain objects for RISCV, this created a discrepancy between their
      behavior. Moreover, enabling the generation of asynchronous unwind
      tables based on whether `-gcc-toolchain` option is present or not
      doesn't seem to be the best criteria to decide on the same. This patch
      make the behavior consistent by disabling the unwind tables in
      RISCVToolChain Baremetal object.
      
      Culprit Patch - https://reviews.llvm.org/D145164
      f1e0392b
    • tsitdikov's avatar
      Add TestArmSME dependency to mlir-opt library. · 6ac2c048
      tsitdikov authored
      TestArmSME was added in https://github.com/llvm/llvm-project/commit/e1326434742980b03433464dd9435ea66ad5be47, now we need to add dependency on it.
      6ac2c048
    • Markus Böck's avatar
      [mlir][NFC] Fix format specifier warning on Windows · d9e4309b
      Markus Böck authored
      `%ld` specifier is defined to work on values of type `long`. The parameter given to `fprintf` is of type `intptr_t` whose actual underlying integer type is unspecified. On Unix systems it happens to commonly be `long` but on 64-bit Windows it is defined as `long long`.
      
      The cross-platform way to print a `intptr_t` is to use `PRIdPTR` which expands to the correct format specifier for `intptr_t`. This avoids any undefined behaviour and compiler warnings.
      d9e4309b
    • Stanislav Mekhanoshin's avatar
      [AMDGPU] Fix encoding of VOP3P dpp on GFX11 and GFX12 (#82710) · 3dfca24d
      Stanislav Mekhanoshin authored
      The bug affects dpp forms of v_dot2_f32_f16. The encoding does not match
      SP3 and does not set op_sel_hi bits properly.
      3dfca24d
    • tsitdikov's avatar
      Add build rule for MLIRArmSMETestPasses · e1326434
      tsitdikov authored
      MLIRArmSMETestPasses was added in https://github.com/llvm/llvm-project/commit/b39f5660a408b47307e57a0882eb8af85d72e283, we need to add a build rule for it as well.
      e1326434
    • Sander de Smalen's avatar
      [Clang] Fix acle_sme_zero.c (missing aarch64-registered-target) · cdf19d13
      Sander de Smalen authored
      This test was added in #82648
      cdf19d13
    • Orlando Cazalet-Hyams's avatar
      [RemoveDIs] Add DPLabels support [3a/3] (#82633) · 8a164220
      Orlando Cazalet-Hyams authored
      Patch 2 of 3 to add llvm.dbg.label support to the RemoveDIs project. The
      patch stack adds the DPLabel class, which is the RemoveDIs llvm.dbg.label
      equivalent.
      
         1. Add DbgRecord base class for DPValue and the not-yet-added
             DPLabel class.
         2. Add the DPLabel class.
      -> 3. Add support to passes.
      
      The next patch, #82639, will enable conversion between dbg.labels and DPLabels.
      
      AssignemntTrackingAnalysis support could have gone two ways:
      
      1. Have the analysis store a DPLabel representation in its results -
         SelectionDAGBuilder reads the analysis results and ignores all DbgRecord
         kinds.
      2. Ignore DPLabels in the analysis - SelectionDAGBuilder reads the analysis
         results but still needs to iterate over DPLabels from the IR.
      
      I went with option 2 because it's less work and is no less correct than 1. It's
      worth noting that causes labels to sink to the bottom of packs of debug records.
      e.g., [value, label, value] becomes [value, value, label]. This shouldn't be a
      problem because labels and variable locations don't have an ordering requirement.
      The ordering between variable locations is maintained and the label movement is
      deterministic
      8a164220
    • Sander de Smalen's avatar
    • Sander de Smalen's avatar
      [Clang][AArch64] Fix 'svzero_za' intrinsic to take no arguments. (#82648) · 22734e15
      Sander de Smalen authored
      We previously defined svzero_za as:
      
        void svzero_za();
      
      rather than:
      
        void svzero_za(void);
      
      Which meant that Clang accepted arguments. Compiling for example
      `svzero_za(<non-constant integer>)` ended up with incorrect IR and a
      compiler crash because it couldn't select an instruction for it.
      22734e15
    • Evgenii Kudriashov's avatar
      [GlobalISel] Fix a check that aligned tail call is lowered (#82016) · 790bcecc
      Evgenii Kudriashov authored
      Despite of a valid tail call opportunity, backends still may not
      generate a tail call or such lowering is not implemented yet.
      
      Check that lowering has happened instead of its possibility when
      generating G_ASSERT_ALIGN.
      790bcecc