Skip to content

Commit c2e7212

Browse files
committed
fix comments, move Int32AttrCase to I32EnumCase and, improve test func name
1 parent f0ee832 commit c2e7212

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

mlir/include/mlir/Dialect/Ptr/IR/PtrEnums.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ def AtomicOrdering : I64EnumAttr<
6767
}
6868

6969
//===----------------------------------------------------------------------===//
70-
// Ptr add flags enum attr.
70+
// Ptr add flags enum properties.
7171
//===----------------------------------------------------------------------===//
7272

7373
def Ptr_PtrAddFlags : I32Enum<"PtrAddFlags", "Pointer add flags", [
74-
I32EnumAttrCase<"none", 0>, I32EnumAttrCase<"nusw", 1>,
75-
I32EnumAttrCase<"nuw", 2>, I32EnumAttrCase<"inbounds", 3>
74+
I32EnumCase<"none", 0>, I32EnumCase<"nusw", 1>, I32EnumCase<"nuw", 2>,
75+
I32EnumCase<"inbounds", 3>
7676
]> {
7777
let cppNamespace = "::mlir::ptr";
7878
}

mlir/include/mlir/Dialect/Ptr/IR/PtrOps.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ def Ptr_TypeOffsetOp : Pointer_Op<"type_offset", [Pure]> {
8282
$elementType attr-dict `:` type($result)
8383
}];
8484
let extraClassDeclaration = [{
85-
/// Returns the type offset according to `layout`. If `layout` is
86-
/// `nullopt` the nearest layout the op will be used for the computation.
85+
/// Returns the type offset according to `layout`. If `layout` is `nullopt`
86+
/// the nearest layout the op will be used for the computation.
8787
llvm::TypeSize getTypeSize(std::optional<DataLayout> layout = std::nullopt);
8888
}];
8989
}

mlir/test/Dialect/Ptr/ops.mlir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// RUN: mlir-opt %s --verify-roundtrip | FileCheck %s
22

33
/// Check op assembly.
4-
func.func @ops0(%ptr: !ptr.ptr<#ptr.generic_space>) -> !ptr.ptr<#ptr.generic_space> {
5-
// CHECK-LABEL: @ops0
4+
// CHECK-LABEL: @ptr_add_type_offset
5+
func.func @ptr_add_type_offset(%ptr: !ptr.ptr<#ptr.generic_space>) -> !ptr.ptr<#ptr.generic_space> {
66
// CHECK: ptr.type_offset f32 : index
77
// CHECK-NEXT: ptr.ptr_add %{{.*}}, %{{.*}} : <#ptr.generic_space>, index
88
// CHECK-NEXT: ptr.ptr_add %{{.*}}, %{{.*}} : <#ptr.generic_space>, index

0 commit comments

Comments
 (0)