[all-commits] [llvm/llvm-project] e38af7: [LV] Refactor getExtendedAddReductionCost to suppo...
Jianjian Guan via All-commits
all-commits at lists.llvm.org
Tue Aug 2 01:02:58 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e38af7ba958aeb26a60b8a188596eb5762c3fde6
https://github.com/llvm/llvm-project/commit/e38af7ba958aeb26a60b8a188596eb5762c3fde6
Author: jacquesguan <Jianjian.Guan at streamcomputing.com>
Date: 2022-08-02 (Tue, 02 Aug 2022)
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/Analysis/TargetTransformInfo.cpp
M llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
M llvm/lib/Target/ARM/ARMTargetTransformInfo.h
M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Log Message:
-----------
[LV] Refactor getExtendedAddReductionCost to support other extended reduction more than Add.
Now the API getExtendedAddReductionCost is used to determine the cost of extended Add reduction with optional Mul. For Arm, it could cover the cases. But for other target, for example: RISCV, they support other kinds of extended recution, such as FAdd.
This patch does the following changes:
1, Split getExtendedAddReductionCost into 2 new API: getExtendedReductionCost which handles the extended reduction with addtional input of Opcode; getMulAccReductionCost which handle the MLA cases the getExtendedAddReductionCost.
2, Refactor getReductionPatternCost, add some contraint condition to make sure the getMulAccReductionCost should only handle the reuction of Add + Mul.
Differential Revision: https://reviews.llvm.org/D130868
More information about the All-commits
mailing list