[PATCH] D77331: [mlir][VectorOps] Implement canonicalization for TransposeOp.
Alex Grosul via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 2 14:06:39 PDT 2020
grosul1 marked 2 inline comments as done.
grosul1 added inline comments.
================
Comment at: mlir/lib/Dialect/Vector/VectorOps.cpp:1595-1599
+ Operation *parentOp = transposeOp.vector().getDefiningOp();
+ if (!isa_and_nonnull<TransposeOp>(parentOp))
+ return failure();
+
+ TransposeOp parentTransposeOp = static_cast<TransposeOp>(parentOp);
----------------
bondhugula wrote:
> Use dyn_cast_or_null ?
> ```
> auto parentTransposeOp = dyn_cast_or_null(transposeOp.vector().getDefiningOp());
> if (!parentTransposeOp)
> return failure();
> ```
Smaller is better, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77331/new/
https://reviews.llvm.org/D77331
More information about the llvm-commits
mailing list