[Mlir-commits] [mlir] [SCF][Transform] Add support for scf.for in LoopFuseSibling op (PR #81495)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Wed Mar 27 09:52:56 PDT 2024
================
@@ -511,7 +532,8 @@ transform::LoopFuseSibling::apply(transform::TransformRewriter &rewriter,
return diag;
// Check if the target can be fused into source.
- if (!isForallWithIdenticalConfiguration(target, source)) {
+ if (!isForallWithIdenticalConfiguration(target, source) &&
+ !isForWithIdenticalConfiguration(target, source)) {
----------------
ftynse wrote:
So this check will `dyn_cast` source and target to one kind, do some checking, and forget about casted results. `fuseSiblings` below will do `dyn_cast` _again_. Could we avoid that by having a positive check for `isForallWith...` and a direct call to `fuseIndependent...` in the body of the conditional?
https://github.com/llvm/llvm-project/pull/81495
More information about the Mlir-commits
mailing list