[all-commits] [llvm/llvm-project] b1f38a: [Target][CodeGen] Remove default CostKind argument...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Wed Sep 22 07:35:15 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b1f38a27f0c95fdf5f81eac4812b781a9d612425
      https://github.com/llvm/llvm-project/commit/b1f38a27f0c95fdf5f81eac4812b781a9d612425
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-09-22 (Wed, 22 Sep 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/Target/AArch64/AArch64TargetTransformInfo.h
    M llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
    M llvm/lib/Target/ARM/ARMTargetTransformInfo.h
    M llvm/lib/Target/BPF/BPFTargetTransformInfo.h
    M llvm/lib/Target/Hexagon/HexagonTargetTransformInfo.h
    M llvm/lib/Target/Lanai/LanaiTargetTransformInfo.h
    M llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.h
    M llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h
    M llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.h
    M llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h
    M llvm/lib/Target/X86/X86TargetTransformInfo.h

  Log Message:
  -----------
  [Target][CodeGen] Remove default CostKind arguments on inner/impl TTI overrides

Based off a discussion on D110100, we should be avoiding default CostKinds whenever possible.

This initial patch removes them from the 'inner' target implementation callbacks - these should only be used by the main TTI calls, so this should guarantee that we don't cause changes in CostKind by missing it in an inner call. This exposed a few missing arguments in getGEPCost and reduction cost calls that I've cleaned up.

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




More information about the All-commits mailing list