[Mlir-commits] [mlir] Refactor LoopFuseSiblingOp and support parallel fusion (PR #94391)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Wed Jun 26 14:51:57 PDT 2024
================
@@ -57,4 +57,24 @@ class HasParallelRegion : public TraitBase<ConcreteType, HasParallelRegion> {
/// Include the generated interface declarations.
#include "mlir/Interfaces/LoopLikeInterface.h.inc"
+namespace mlir {
+/// A function that rewrites `target`'s terminator as a teminator obtained by
+/// fusing `source` into `target`.
+using FuseTerminatorFn =
+ std::function<void(RewriterBase &rewriter, LoopLikeOpInterface source,
----------------
ftynse wrote:
When somebody wants to change that, it's up to them to update the typedef. We shouldn't be paying the cost for unlikely hypotheticals. I suspect we should update `NewYieldValuesFn` to be a `function_ref` as well. There is a lot of suboptimal data structure use in loop/tiling interfaces unfortunately.
https://github.com/llvm/llvm-project/pull/94391
More information about the Mlir-commits
mailing list