[Mlir-commits] [mlir] [mlir][linalg]Implement canonicalizer for `BroadCastOp` on tensors (PR #80466)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Feb 2 13:49:44 PST 2024
================
@@ -1907,6 +1907,20 @@ void BroadcastOp::getEffects(
getDpsInits());
}
+LogicalResult BroadcastOp::canonicalize(BroadcastOp op,
----------------
MaheshRavishankar wrote:
We can keep this, but a similar optimization is written for `linalg.generic` that is more general. This is fine for me, but maybe moving the https://github.com/llvm/llvm-project/blob/659419ac2f05035cd8ff19806a9e48ccc725d3ba/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp#L1095 to work on the `LinalgOp` interface will just make all of this unnecessary. I am not strongly opinionated though. This looks fine as well.
https://github.com/llvm/llvm-project/pull/80466
More information about the Mlir-commits
mailing list