[NFCI][CostModel] Unify getCmpSelInstrCost
authorSam Parker <sam.parker@arm.com>
Tue, 26 May 2020 13:28:34 +0000 (14:28 +0100)
committerSam Parker <sam.parker@arm.com>
Tue, 9 Jun 2020 06:41:22 +0000 (07:41 +0100)
commit37289615c01d08915626c58f825bc797c3a036e4
treed6e303293d8116d47d23291c5006cf30b9fa0e6e
parent30dfbf03a206ad4f2a18d7fb904831ee728b6cbc
[NFCI][CostModel] Unify getCmpSelInstrCost

Add cases for icmp, fcmp and select into the switch statement of the
generic getUserCost implementation with getInstructionThroughput then
calling into it. The BasicTTI and backend implementations have be set
to return a default value (1) when a cost other than throughput is
being queried.

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