[all-commits] [llvm/llvm-project] c1ba9c: [mlir][Affine] Refactor affine fusion code in pass...
Diego Caballero via All-commits
all-commits at lists.llvm.org
Wed Nov 18 14:06:25 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: c1ba9c43adb7ee101048e88ab33c94a1ceda398e
https://github.com/llvm/llvm-project/commit/c1ba9c43adb7ee101048e88ab33c94a1ceda398e
Author: Diego Caballero <diego.caballero at intel.com>
Date: 2020-11-18 (Wed, 18 Nov 2020)
Changed paths:
M mlir/include/mlir/Analysis/Utils.h
M mlir/include/mlir/Transforms/LoopFusionUtils.h
M mlir/lib/Analysis/Utils.cpp
M mlir/lib/Transforms/LoopFusion.cpp
M mlir/lib/Transforms/Utils/LoopFusionUtils.cpp
M mlir/test/lib/Transforms/TestLoopFusion.cpp
Log Message:
-----------
[mlir][Affine] Refactor affine fusion code in pass to utilities
Refactoring/clean-up step needed to add support for producer-consumer fusion
with multi-store producer loops and, in general, to implement more general
loop fusion strategies in Affine. It introduces the following changes:
- AffineLoopFusion pass now uses loop fusion utilities more broadly to compute
fusion legality (canFuseLoops utility) and perform the fusion transformation
(fuseLoops utility).
- Loop fusion utilities have been extended to deal with AffineLoopFusion
requirements and assumptions while preserving both loop fusion utilities and
AffineLoopFusion current functionality within a unified implementation.
'FusionStrategy' has been introduced for this purpose and, in the future, it
will allow us to have a single loop fusion core implementation that will produce
different fusion outputs depending on the strategy used.
- Improve separation of concerns for legality and profitability analysis:
'isFusionProfitable' no longer filters out illegal scenarios that 'canFuse'
didn't detect, or the other way around. 'canFuse' now takes loop dependences
into account to determine the fusion loop depth (producer-consumer fusion only).
- As a result, maximal fusion now doesn't require any profitability analysis.
- Slices are now computed only once and reused across the legality, profitability
and fusion transformation steps (producer-consumer).
- Refactor some utilities and remove redundant copies of them.
This patch is NFCI and should preserve the existing functionality of both the
AffineLoopFusion pass and the affine fusion utilities.
Reviewed By: andydavis1, bondhugula
Differential Revision: https://reviews.llvm.org/D90798
More information about the All-commits
mailing list