[CostModel] getCFInstrCost in getUserCost.
authorSam Parker <sam.parker@arm.com>
Mon, 15 Jun 2020 07:58:25 +0000 (08:58 +0100)
committerSam Parker <sam.parker@arm.com>
Mon, 15 Jun 2020 08:28:46 +0000 (09:28 +0100)
commit2596da31740ff753103e5d5e47ab30bae53d3d9d
tree7faa46e363153919346a07cad18fd73d2d073ade
parent2d8f8c4de38e592eb4fcf6a4ed858763974f8b9f
[CostModel] getCFInstrCost in getUserCost.

Have BasicTTI call the base implementation so that both agree on the
default behaviour, which the default being a cost of '1'. This has
required an X86 specific implementation as it seems to be very
reliant on those instructions being free. Changes are also made to
AMDGPU so that their implementations distinguish between cost kinds,
so that the unrolling isn't affected. PowerPC also has its own
implementation to prevent changes to the reg-usage vectorizer test.

The cost model test changes now reflect that ret instructions are not
generally free.

Differential Revision: https://reviews.llvm.org/D79164
42 files changed:
llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
llvm/include/llvm/CodeGen/BasicTTIImpl.h
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h
llvm/lib/Target/X86/X86TargetTransformInfo.cpp
llvm/lib/Target/X86/X86TargetTransformInfo.h
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Analysis/CostModel/AArch64/aggregates.ll
llvm/test/Analysis/CostModel/AArch64/cast.ll
llvm/test/Analysis/CostModel/AArch64/cmp.ll
llvm/test/Analysis/CostModel/AArch64/select.ll
llvm/test/Analysis/CostModel/AArch64/shuffle-broadcast.ll
llvm/test/Analysis/CostModel/AArch64/store.ll
llvm/test/Analysis/CostModel/ARM/arith-overflow.ll
llvm/test/Analysis/CostModel/ARM/arith-ssat.ll
llvm/test/Analysis/CostModel/ARM/arith-usat.ll
llvm/test/Analysis/CostModel/ARM/arith.ll
llvm/test/Analysis/CostModel/ARM/cast.ll
llvm/test/Analysis/CostModel/ARM/cmps.ll
llvm/test/Analysis/CostModel/ARM/control-flow.ll
llvm/test/Analysis/CostModel/ARM/divrem.ll
llvm/test/Analysis/CostModel/ARM/fparith.ll
llvm/test/Analysis/CostModel/ARM/freeshift.ll
llvm/test/Analysis/CostModel/ARM/gep.ll
llvm/test/Analysis/CostModel/ARM/immediates.ll
llvm/test/Analysis/CostModel/ARM/load_store.ll
llvm/test/Analysis/CostModel/ARM/mve-gather-scatter-cost.ll
llvm/test/Analysis/CostModel/ARM/reduce-add.ll
llvm/test/Analysis/CostModel/ARM/reduce-smax.ll
llvm/test/Analysis/CostModel/ARM/reduce-smin.ll
llvm/test/Analysis/CostModel/ARM/reduce-umax.ll
llvm/test/Analysis/CostModel/ARM/reduce-umin.ll
llvm/test/Analysis/CostModel/ARM/select.ll
llvm/test/Analysis/CostModel/ARM/shuffle.ll
llvm/test/Analysis/CostModel/RISCV/gep.ll
llvm/test/Analysis/CostModel/SystemZ/cmp-mem.ll
llvm/test/Analysis/CostModel/SystemZ/int-operands-extcost.ll
llvm/test/Transforms/LoopVectorize/AArch64/aarch64-predication.ll
llvm/test/Transforms/LoopVectorize/AArch64/extractvalue-no-scalarization-required.ll
llvm/test/Transforms/LoopVectorize/AArch64/predication_costs.ll
llvm/test/Transforms/LoopVectorize/SystemZ/branch-for-predicated-block.ll