[Mlir-commits] [mlir] 209dadf - [mlir] Fix formatting in Ops.td files (NFC)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Nov 16 16:59:50 PST 2021
Author: Mogball
Date: 2021-11-17T00:59:42Z
New Revision: 209dadf2693220a0998d19ada617b09eaab42c24
URL: https://github.com/llvm/llvm-project/commit/209dadf2693220a0998d19ada617b09eaab42c24
DIFF: https://github.com/llvm/llvm-project/commit/209dadf2693220a0998d19ada617b09eaab42c24.diff
LOG: [mlir] Fix formatting in Ops.td files (NFC)
MemRefOps.td has some inconsistencies in its formatting of argument
lists.
Added:
Modified:
mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCompositeOps.td
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td b/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
index ba7e359da086d..dac7b756b4f73 100644
--- a/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
+++ b/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
@@ -48,10 +48,11 @@ class AllocLikeOp<string mnemonic,
], traits)> {
let arguments = (ins Variadic<Index>:$dynamicSizes,
- // The symbolic operands (the ones in square brackets) bind
- // to the symbols of the memref's layout map.
- Variadic<Index>:$symbolOperands,
- Confined<OptionalAttr<I64Attr>, [IntMinValue<0>]>:$alignment);
+ // The symbolic operands (the ones in square brackets)
+ // bind to the symbols of the memref's layout map.
+ Variadic<Index>:$symbolOperands,
+ Confined<OptionalAttr<I64Attr>,
+ [IntMinValue<0>]>:$alignment);
let results = (outs Res<AnyMemRef, "", [MemAlloc<resource>]>:$memref);
let builders = [
@@ -753,11 +754,9 @@ def MemRef_DmaWaitOp : MemRef_Op<"dma_wait"> {
dma_wait %tag[%index], %num_elements : memref<1 x i32, (d0) -> (d0), 2>
```
}];
- let arguments = (ins
- AnyMemRef:$tagMemRef,
- Variadic<Index>:$tagIndices,
- Index:$numElements
- );
+ let arguments = (ins AnyMemRef:$tagMemRef,
+ Variadic<Index>:$tagIndices,
+ Index:$numElements);
let assemblyFormat = [{
$tagMemRef `[` $tagIndices `]` `,` $numElements attr-dict `:`
type($tagMemRef)
@@ -853,14 +852,12 @@ def MemRef_GlobalOp : MemRef_Op<"global", [Symbol]> {
```
}];
- let arguments = (ins
- SymbolNameAttr:$sym_name,
- OptionalAttr<StrAttr>:$sym_visibility,
- MemRefTypeAttr:$type,
- OptionalAttr<AnyAttr>:$initial_value,
- UnitAttr:$constant,
- OptionalAttr<I64Attr>:$alignment
- );
+ let arguments = (ins SymbolNameAttr:$sym_name,
+ OptionalAttr<StrAttr>:$sym_visibility,
+ MemRefTypeAttr:$type,
+ OptionalAttr<AnyAttr>:$initial_value,
+ UnitAttr:$constant,
+ OptionalAttr<I64Attr>:$alignment);
let assemblyFormat = [{
($sym_visibility^)?
@@ -978,10 +975,10 @@ def MemRef_PrefetchOp : MemRef_Op<"prefetch"> {
}];
let arguments = (ins AnyMemRef:$memref, Variadic<Index>:$indices,
- BoolAttr:$isWrite,
- Confined<I32Attr, [IntMinValue<0>,
- IntMaxValue<3>]>:$localityHint,
- BoolAttr:$isDataCache);
+ BoolAttr:$isWrite,
+ Confined<I32Attr, [IntMinValue<0>,
+ IntMaxValue<3>]>:$localityHint,
+ BoolAttr:$isDataCache);
let extraClassDeclaration = [{
MemRefType getMemRefType() {
@@ -1024,15 +1021,13 @@ def MemRef_ReinterpretCastOp:
```
}];
- let arguments = (ins
- Arg<AnyRankedOrUnrankedMemRef, "", []>:$source,
- Variadic<Index>:$offsets,
- Variadic<Index>:$sizes,
- Variadic<Index>:$strides,
- I64ArrayAttr:$static_offsets,
- I64ArrayAttr:$static_sizes,
- I64ArrayAttr:$static_strides
- );
+ let arguments = (ins Arg<AnyRankedOrUnrankedMemRef, "", []>:$source,
+ Variadic<Index>:$offsets,
+ Variadic<Index>:$sizes,
+ Variadic<Index>:$strides,
+ I64ArrayAttr:$static_offsets,
+ I64ArrayAttr:$static_sizes,
+ I64ArrayAttr:$static_strides);
let results = (outs AnyMemRef:$result);
let assemblyFormat = [{
@@ -1130,10 +1125,8 @@ def MemRef_ReshapeOp: MemRef_Op<"reshape", [
```
}];
- let arguments = (ins
- AnyRankedOrUnrankedMemRef:$source,
- MemRefRankOf<[AnySignlessInteger, Index], [1]>:$shape
- );
+ let arguments = (ins AnyRankedOrUnrankedMemRef:$source,
+ MemRefRankOf<[AnySignlessInteger, Index], [1]>:$shape);
let results = (outs AnyRankedOrUnrankedMemRef:$result);
let builders = [OpBuilder<
@@ -1504,15 +1497,13 @@ def SubViewOp : BaseOpWithOffsetSizesAndStrides<
}
}];
- let arguments = (ins
- AnyMemRef:$source,
- Variadic<Index>:$offsets,
- Variadic<Index>:$sizes,
- Variadic<Index>:$strides,
- I64ArrayAttr:$static_offsets,
- I64ArrayAttr:$static_sizes,
- I64ArrayAttr:$static_strides
- );
+ let arguments = (ins AnyMemRef:$source,
+ Variadic<Index>:$offsets,
+ Variadic<Index>:$sizes,
+ Variadic<Index>:$strides,
+ I64ArrayAttr:$static_offsets,
+ I64ArrayAttr:$static_sizes,
+ I64ArrayAttr:$static_strides);
let results = (outs AnyMemRef:$result);
let assemblyFormat = [{
@@ -1774,8 +1765,8 @@ def MemRef_ViewOp : MemRef_Op<"view", [
}];
let arguments = (ins MemRefRankOf<[I8], [1]>:$source,
- Index:$byte_shift,
- Variadic<Index>:$sizes);
+ Index:$byte_shift,
+ Variadic<Index>:$sizes);
let results = (outs AnyMemRef);
let extraClassDeclaration = [{
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCompositeOps.td b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCompositeOps.td
index 7a5e1de3cd129..a1daf12c4773d 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCompositeOps.td
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCompositeOps.td
@@ -211,9 +211,9 @@ def SPV_VectorExtractDynamicOp : SPV_Op<"VectorExtractDynamic", [
);
let verifier = [{ return success(); }];
-
+
let assemblyFormat = [{
- $vector `[` $index `]` attr-dict `:` type($vector) `,` type($index)
+ $vector `[` $index `]` attr-dict `:` type($vector) `,` type($index)
}];
}
@@ -249,7 +249,7 @@ def SPV_VectorInsertDynamicOp : SPV_Op<"VectorInsertDynamic", [
<!-- End of AutoGen section -->
```
- scalar-type ::= integer-type | float-type | boolean-type
+ scalar-type ::= integer-type | float-type | boolean-type
vector-insert-dynamic-op ::= `spv.VectorInsertDynamic ` ssa-use `,`
ssa-use `[` ssa-use `]`
`:` `vector<` integer-literal `x` scalar-type `>` `,`
@@ -275,9 +275,9 @@ def SPV_VectorInsertDynamicOp : SPV_Op<"VectorInsertDynamic", [
);
let verifier = [{ return success(); }];
-
+
let assemblyFormat = [{
- $component `,` $vector `[` $index `]` attr-dict `:` type($vector) `,` type($index)
+ $component `,` $vector `[` $index `]` attr-dict `:` type($vector) `,` type($index)
}];
}
More information about the Mlir-commits
mailing list