[PATCH] D79884: [mlir][Linalg] Fix missing template keyword.
Mahesh Ravishankar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 13 10:17:23 PDT 2020
mravishankar created this revision.
Herald added subscribers: llvm-commits, Kayjukh, frgossen, grosul1, Joonsoo, stephenneuendorffer, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, jpienaar, rriddle, mehdi_amini.
Herald added a reviewer: nicolasvasilache.
Herald added a project: LLVM.
ftynse accepted this revision.
This revision is now accepted and ready to land.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D79884
Files:
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
Index: mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
===================================================================
--- mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
+++ mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
@@ -296,8 +296,7 @@
using OpRewritePattern<ReshapeOpTy>::OpRewritePattern;
LogicalResult matchAndRewrite(ReshapeOpTy reshapeOp,
PatternRewriter &rewriter) const override {
- auto srcReshapeOp =
- dyn_cast_or_null<ReshapeOpTy>(reshapeOp.src().getDefiningOp());
+ auto srcReshapeOp = reshapeOp.src().template getDefiningOp<ReshapeOpTy>();
if (!srcReshapeOp)
return failure();
@@ -340,7 +339,7 @@
// producer is same as the return type of the consumer. This can only be
// verified if the shapes in question are static.
ReshapeOpTy reshapeSrcOp =
- dyn_cast_or_null<ReshapeOpTy>(reshapeOp.src().getDefiningOp());
+ reshapeOp.src().template getDefiningOp<ReshapeOpTy>();
if (reshapeSrcOp && reshapeSrcOp.getSrcType().hasStaticShape() &&
reshapeOp.getResultType().hasStaticShape() &&
reshapeSrcOp.getSrcType() == reshapeOp.getResultType())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79884.263763.patch
Type: text/x-patch
Size: 1143 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200513/d907aa05/attachment-0001.bin>
More information about the llvm-commits
mailing list