[PATCH] D105432: [Analysis] Add simple cost model for strict (in-order) reductions
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 9 03:12:23 PDT 2021
david-arm updated this revision to Diff 357465.
david-arm edited the summary of this revision.
david-arm added a comment.
- Added doxygen comments above new enum and commented on the new RedType argument in the TTI interface.
- Renamed Split enum member to TreeWise.
- Removed the two FIXMEs in getTypeBasedIntrinsicInstrCost and ensured that getArithmeticReductionCost is called with the correct reduction type according to the FastMathFlags object. This meant fixing up some X86 tests that previously did not use the `fast` attribute on the intrinsic call. In general callers now have to explicitly add `fast` to the intrinsic for the tree-based reduction cost.
- Added code check for supported opcodes (ISD::FADD) in AArch64TargetTransformInfo::getArithmeticReductionCost for the ordered case. For all other opcodes (ISD::FMUL, etc.) we return Invalid.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105432/new/
https://reviews.llvm.org/D105432
Files:
llvm/include/llvm/Analysis/TargetTransformInfo.h
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/AArch64/AArch64TargetTransformInfo.h
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
llvm/lib/Target/ARM/ARMTargetTransformInfo.h
llvm/lib/Target/X86/X86TargetTransformInfo.cpp
llvm/lib/Target/X86/X86TargetTransformInfo.h
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Analysis/CostModel/AArch64/reduce-fadd.ll
llvm/test/Analysis/CostModel/AArch64/sve-intrinsics.ll
llvm/test/Analysis/CostModel/X86/intrinsic-cost-kinds.ll
llvm/test/Analysis/CostModel/X86/reduce-fadd.ll
llvm/test/Analysis/CostModel/X86/reduce-fmul.ll
llvm/test/Transforms/LoopVectorize/AArch64/strict-fadd-cost.ll
llvm/test/Transforms/LoopVectorize/AArch64/sve-strict-fadd-cost.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105432.357465.patch
Type: text/x-patch
Size: 93254 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210709/c6de0696/attachment.bin>
More information about the llvm-commits
mailing list