[CostModel] Unify getArithmeticInstrCost
authorSam Parker <sam.parker@arm.com>
Fri, 5 Jun 2020 07:42:03 +0000 (08:42 +0100)
committerSam Parker <sam.parker@arm.com>
Wed, 10 Jun 2020 08:08:45 +0000 (09:08 +0100)
commitfa8bff0cd1ad28b78a8910ebb1be077ef010f91f
tree94e646bddc305e3fa3bc42f8b0f90b2b6530d8f7
parent49e4faa010e1fde152404c1f393a4e8d72f27792
[CostModel] Unify getArithmeticInstrCost

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.

Differential Revision: https://reviews.llvm.org/D80992
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