[all-commits] [llvm/llvm-project] f8efc5: [NFC][TTI] Add/extract `getReplicationShuffleCost(...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Sat Nov 6 06:55:46 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f8efc5c0ac68d2f94c8f83e65798e786e2c8c8cd
      https://github.com/llvm/llvm-project/commit/f8efc5c0ac68d2f94c8f83e65798e786e2c8c8cd
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-11-06 (Sat, 06 Nov 2021)

  Changed paths:
    M llvm/include/llvm/Analysis/TargetTransformInfo.h
    M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
    M llvm/include/llvm/CodeGen/BasicTTIImpl.h
    M llvm/lib/Analysis/TargetTransformInfo.cpp
    M llvm/lib/Target/X86/X86TargetTransformInfo.cpp

  Log Message:
  -----------
  [NFC][TTI] Add/extract `getReplicationShuffleCost()` method, deduplicate it's implementations

Hiding it in `getInterleavedMemoryOpCost()` is problematic for a number of reasons,
including testability and reuse, let's do better.

In a followup `getUserCost()` will be taught to use to to estimate the mask costs,
which will allow for better cost model tests for it.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D113313


  Commit: a30ec4778a479da15f53811a1c79484078e00858
      https://github.com/llvm/llvm-project/commit/a30ec4778a479da15f53811a1c79484078e00858
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-11-06 (Sat, 06 Nov 2021)

  Changed paths:
    M llvm/include/llvm/Analysis/TargetTransformInfo.h
    M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
    M llvm/include/llvm/CodeGen/BasicTTIImpl.h
    M llvm/lib/Analysis/TargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/X86/shuffle-replication-i8.ll

  Log Message:
  -----------
  [TTI][CostModel] `getUserCost()`: recognize replication shuffles and query their cost

This finally creates proper test coverage for replication shuffles,
that are used by LV for conditional loads, and will allow to add
proper costmodel at least for AVX512.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D113324


Compare: https://github.com/llvm/llvm-project/compare/39c4c7d3912a...a30ec4778a47


More information about the All-commits mailing list