[llvm-branch-commits] [mlir] ed507bc - [mlir] NFC - Fix SubViewOp printing

Nicolas Vasilache via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Dec 30 08:44:11 PST 2020


Author: Nicolas Vasilache
Date: 2020-12-30T16:34:37Z
New Revision: ed507bc4d5eee48560d28089ab6e31d91ef3fd88

URL: https://github.com/llvm/llvm-project/commit/ed507bc4d5eee48560d28089ab6e31d91ef3fd88
DIFF: https://github.com/llvm/llvm-project/commit/ed507bc4d5eee48560d28089ab6e31d91ef3fd88.diff

LOG: [mlir] NFC - Fix SubViewOp printing

Avoid casting the source operand type allows better debugging when conversion patterns
fail to produce a proper MemRefType.

Added: 
    

Modified: 
    mlir/lib/Dialect/StandardOps/IR/Ops.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
index 30bf546807c4..c73a9a41719c 100644
--- a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
+++ b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
@@ -3053,7 +3053,7 @@ static void print(OpAsmPrinter &p, SubViewOp op) {
   p << op->getName().getStringRef().drop_front(stdDotLen) << ' ';
   p << op.source();
   printOffsetsSizesAndStrides(p, op);
-  p << " : " << op.getSourceType() << " to " << op.getType();
+  p << " : " << op.source().getType() << " to " << op.getType();
 }
 
 /// Parse a subview op of the form:


        


More information about the llvm-branch-commits mailing list