[Mlir-commits] [mlir] [mlir][Hoisting] Hoisting vector.extract/vector.broadcast pairs (PR #86108)

Matthias Springer llvmlistbot at llvm.org
Fri Apr 12 00:23:05 PDT 2024


================
@@ -43,6 +43,120 @@ using llvm::dbgs;
 using namespace mlir;
 using namespace mlir::linalg;
 
+scf::ForOp replaceWithDifferentYield(RewriterBase &rewriter, scf::ForOp loop,
----------------
matthias-springer wrote:

Would it be possible to reuse `replaceWithAdditionalYields` instead of this helper function? Something along the lines of:
- appending a new yield
- cloning the extract/broadcast outside of the loop
- updating the uses
- let the original extract/broadcast fold away

Not sure if it's worth it. Just thinking out loud...


https://github.com/llvm/llvm-project/pull/86108


More information about the Mlir-commits mailing list