1. Feb 02, 2024
  2. Feb 01, 2024
    • Philip Reames's avatar
    • Ivan Butygin's avatar
      [mlir][scf] Add reductions support to `scf.parallel` fusion (#75955) · 6050cf28
      Ivan Butygin authored
      Properly handle fusion of loops with reductions:
      * Check there are no first loop results users between loops
      * Create new loop op with merged reduction init values
      * Update `scf.reduce` op to contain reductions from both loops
      * Update loops users with new loop results
      6050cf28
    • Yaxun (Sam) Liu's avatar
      [HIP] fix HIP detection for /usr (#80190) · fcd37523
      Yaxun (Sam) Liu authored
      Skip checking HIP version file under parent directory for /usr/local
      since /usr will be checked after /usr/local.
      
      Fixes: https://github.com/llvm/llvm-project/issues/78344
      fcd37523
    • Amir Ayupov's avatar
      [BOLT] Add extra staleness logging (#80225) · 3c64b24e
      Amir Ayupov authored
      Report two extra metrics:
      - # of stale functions with matching block count,
      - # of stale blocks with matching instruction count.
      3c64b24e
    • Nikita Popov's avatar
      [LoopUnroll] Fix missing sign extension · 62ae7d97
      Nikita Popov authored
      For integers larger than 64-bit, this would zero-extend a -1
      value, instead of sign-extending it.
      
      Fixes https://github.com/llvm/llvm-project/issues/80289.
      62ae7d97
    • Nikita Popov's avatar
      [LoopUnroll] Add test for #80289 (NFC) · f7b05e05
      Nikita Popov authored
      f7b05e05
    • Jie Fu's avatar
      [PowerPC] Fix -Wunused-variable in PPCAsmPrinter.cpp and PPCISelDAGToDAG.cpp (NFC) · 40f6b7d4
      Jie Fu authored
      llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1648:15:
      error: unused variable 'InstDisp' [-Werror,-Wunused-variable]
          ptrdiff_t InstDisp = TLSVarAddress + Offset - Delta;
                    ^
      llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:7624:19:
      error: unused variable 'TPReg' [-Werror,-Wunused-variable]
        RegisterSDNode *TPReg = dyn_cast<RegisterSDNode>(TPRegNode.getNode());
                        ^
      llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:7625:23:
      error: unused variable 'Subtarget' [-Werror,-Wunused-variable]
        const PPCSubtarget &Subtarget =
                            ^
      40f6b7d4
    • Amy Kwan's avatar
      [AIX][TLS] Optimize the small local-exec access sequence for non-zero offsets (#71485) · 2a509215
      Amy Kwan authored
      This patch utilizes the -maix-small-local-exec-tls option to produce a
      faster,
      non-TOC-based access sequence for the local-exec TLS model.
      Specifically, for
      when the offsets from the TLS variable are non-zero.
      
      In particular, this patch produces either a single:
      - addi/la with a displacement off of R13 plus a non-zero offset for when
      an address is calculated, or
      - load or store off of R13 plus a non-zero offset for when an address is
      calculated and used for further
        access where R13 is the thread pointer, respectively.
      
      In order to produce a single addi or load/store off of the thread
      pointer with a non-zero offset,
      this patch also adds the necessary support in the assembly printer when
      printing these instructions.
      
      Specifically:
      - The non-zero offset is added to the TLS variable address when the
      address of the
        TLS variable + it's offset is less than 32KB.
      - Otherwise, when the address of the TLS variable + its offset is
      greater than 32KB, the
      non-zero offset (and a multiple of 64KB) is subtracted from the TLS
      address.
      
      This handling in the assembly printer is necessary to ensure that the
      TLS address + the non-zero offset
      is between [-32768, 32768), so that the total displacement can fit
      within the addi/load/store instructions.
      
      This patch is meant to be a follow-up to
      3f46e545 (where the
      optimization occurs for when the offset is zero).
      2a509215
    • Alexey Bataev's avatar
    • Quentin Dian's avatar
      [MIRPrinter] Don't print line break when there is no instructions (NFC) (#80147) · 112fba97
      Quentin Dian authored
      Per #80143, we can remove the extra line break when there is no
      instruction.
      112fba97
    • Hsiangkai Wang's avatar
      [mlir][scf] Considering defining operators of indices when fusing scf::ParallelOp (#80145) · c3eb2978
      Hsiangkai Wang authored
      When checking the load indices of the second loop coincide with the
      store indices of the first loop, it only considers the index values are
      the same or not. However, there are some cases the index values defined
      by other operators. In these cases, it will treat them as different even
      the results of defining operators are the same.
      
      We already check if the iteration space is the same in isFusionLegal().
      When checking operands of defining operators, we only need to consider
      the operands come from the same induction variables. If so, we know the
      results of defining operators are the same.
      c3eb2978
    • David Green's avatar
      [AArch64] Alter latency of FCSEL under Cortex-A510 (#80178) · 5d41788f
      David Green authored
      As per the Cortex-A510 software optimization guide, the latency of a
      fcsel should be 3 not 4. It would previously get the latency from
      WriteF.
      5d41788f
    • Sander de Smalen's avatar
      [AArch64] Replace LLVM IR function attributes for PSTATE.ZA. (#79166) · d313614b
      Sander de Smalen authored
      Since https://github.com/ARM-software/acle/pull/276 the ACLE
      defines attributes to better describe the use of a given SME state.
      
      Previously the attributes merely described the possibility of it being
      'shared' or 'preserved', whereas the new attributes have more semantics
      and also describe how the data flows through the program.
      
      For ZT0 we already had to add new LLVM IR attributes:
      * aarch64_new_zt0
      * aarch64_in_zt0
      * aarch64_out_zt0
      * aarch64_inout_zt0
      * aarch64_preserves_zt0
      
      We have now done the same for ZA, such that we add:
      * aarch64_new_za       (previously `aarch64_pstate_za_new`)
      * aarch64_in_za (more specific variation of `aarch64_pstate_za_shared`)
      * aarch64_out_za (more specific variation of `aarch64_pstate_za_shared`)
      * aarch64_inout_za (more specific variation of
      `aarch64_pstate_za_shared`)
      * aarch64_preserves_za (previously `aarch64_pstate_za_shared,
      aarch64_pstate_za_preserved`)
      
      This explicitly removes 'pstate' from the name, because with SME2 and
      the new ACLE attributes there is a difference between "sharing ZA"
      (sharing
      the ZA matrix register with the caller) and "sharing PSTATE.ZA" (sharing
      either the ZA or ZT0 register, both part of PSTATE.ZA with the caller).
      d313614b