[PATCH] D80992: [CostModel] Unify getArithmeticInstrCost

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 2 04:25:02 PDT 2020


samparker created this revision.
samparker added reviewers: dfukalov, arsenm, RKSimon, craig.topper, uweigand.
Herald added subscribers: kerbowa, kbarton, hiraditya, tpr, nhaehnle, wdng, jvesely, nemanjai.
Herald added a project: LLVM.

Add the remaining arithmetic opcodes into the generic implementation of getUserCost and then call this from getInstructionThroughput. Most of the backends have been modified to return the base implementation for cost kinds other RecipThroughput. The outlier here is AMDGPU which already uses getArithmeticInstrCost for all the cost kinds. This change means that most of the opcodes can be removed from that backends implementation of getUserCost.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80992

Files:
  llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
  llvm/include/llvm/CodeGen/BasicTTIImpl.h
  llvm/lib/Analysis/TargetTransformInfo.cpp
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
  llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
  llvm/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp
  llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
  llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
  llvm/lib/Target/X86/X86TargetTransformInfo.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80992.267841.patch
Type: text/x-patch
Size: 11625 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200602/8d06d0fd/attachment.bin>


More information about the llvm-commits mailing list