[Mlir-commits] [mlir] 4ffe6bd - [mlir] NFC formatting cleanup.
Tres Popp
llvmlistbot at llvm.org
Fri Jun 5 02:01:05 PDT 2020
Author: Tres Popp
Date: 2020-06-05T11:00:20+02:00
New Revision: 4ffe6bd8a7b0775626bd250f6b67c2254d6d6e74
URL: https://github.com/llvm/llvm-project/commit/4ffe6bd8a7b0775626bd250f6b67c2254d6d6e74
DIFF: https://github.com/llvm/llvm-project/commit/4ffe6bd8a7b0775626bd250f6b67c2254d6d6e74.diff
LOG: [mlir] NFC formatting cleanup.
Added:
Modified:
mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
mlir/lib/Dialect/Shape/IR/Shape.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td b/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
index 88ee5f4d520b..5fc2aa4fa2d6 100644
--- a/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
+++ b/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
@@ -449,8 +449,8 @@ def Shape_AnyOp : Shape_Op<"any", [Commutative, NoSideEffect]> {
Example:
```mlir
- %s0 = shape.any [2,?], [?,3] // [2,3]
- %s1 = shape.any [?,?], [1,2] // [1,2]
+ %s0 = shape.any [2,?], [?,3] // [2,3]
+ %s1 = shape.any [?,?], [1,2] // [1,2]
```
}];
@@ -475,11 +475,11 @@ def Shape_AssumingAllOp : Shape_Op<"assuming_all", [Commutative, NoSideEffect]>
Example:
```mlir
- %w0 = shape.cstr_broadcastable [2,2], [3,1,2] // Passing
- %w1 = shape.cstr_broadcastable [2,2], [3,2] // Failure
- %w2 = shape.cstr_eq [1,2], [1,2], [1,2] // Passing
- %wf = shape.assuming_all %w0, %w1 // Failure
- %wt = shape.assuming_all %w0, %w2 // Passing
+ %w0 = shape.cstr_broadcastable [2,2], [3,1,2] // Passing
+ %w1 = shape.cstr_broadcastable [2,2], [3,2] // Failure
+ %w2 = shape.cstr_eq [1,2], [1,2], [1,2] // Passing
+ %wf = shape.assuming_all %w0, %w1 // Failure
+ %wt = shape.assuming_all %w0, %w2 // Passing
```
}];
@@ -543,8 +543,8 @@ def Shape_CstrBroadcastableOp : Shape_Op<"cstr_broadcastable", [Commutative]> {
Example:
```mlir
- %w0 = shape.cstr_broadcastable [2,2], [3,1,2] // Passing
- %w1 = shape.cstr_broadcastable [2,2], [3,2] // Failure
+ %w0 = shape.cstr_broadcastable [2,2], [3,1,2] // Passing
+ %w1 = shape.cstr_broadcastable [2,2], [3,2] // Failure
```
}];
@@ -566,8 +566,8 @@ def Shape_CstrEqOp : Shape_Op<"cstr_eq", [Commutative]> {
Example:
```mlir
- %w0 = shape.cstr_eq [1,2], [1,2], [1,2] // Passing
- %w1 = shape.cstr_eq [2,2], [1,2] // Failure
+ %w0 = shape.cstr_eq [1,2], [1,2], [1,2] // Passing
+ %w1 = shape.cstr_eq [2,2], [1,2] // Failure
```
}];
let arguments = (ins Variadic<Shape_ShapeType>:$inputs);
diff --git a/mlir/lib/Dialect/Shape/IR/Shape.cpp b/mlir/lib/Dialect/Shape/IR/Shape.cpp
index 5866b0ac2680..ed89d5bca19a 100644
--- a/mlir/lib/Dialect/Shape/IR/Shape.cpp
+++ b/mlir/lib/Dialect/Shape/IR/Shape.cpp
@@ -39,16 +39,13 @@ ShapeDialect::ShapeDialect(MLIRContext *context)
Operation *ShapeDialect::materializeConstant(OpBuilder &builder,
Attribute value, Type type,
Location loc) {
- if (auto shapeType = type.dyn_cast<ShapeType>()) {
+ if (auto shapeType = type.dyn_cast<ShapeType>())
return builder.create<ConstShapeOp>(loc, type,
value.cast<DenseIntElementsAttr>());
- }
- if (auto sizeType = type.dyn_cast<SizeType>()) {
+ if (auto sizeType = type.dyn_cast<SizeType>())
return builder.create<ConstSizeOp>(loc, type, value.cast<IntegerAttr>());
- }
- if (auto witnessType = type.dyn_cast<WitnessType>()) {
+ if (auto witnessType = type.dyn_cast<WitnessType>())
return builder.create<ConstWitnessOp>(loc, type, value.cast<BoolAttr>());
- }
return nullptr;
}
More information about the Mlir-commits
mailing list