[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
Author: jacquesguan <Jianjian.Guan at streamcomputing.com>
Date: 2022-08-02 (Tue, 02 Aug 2022)
[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