diff options
author | Jacques Pienaar <jpienaar@google.com> | 2022-08-07 08:46:15 -0700 |
---|---|---|
committer | Jacques Pienaar <jpienaar@google.com> | 2022-08-07 08:46:15 -0700 |
commit | 7602e285f69c4e3af60629100c151067c27b9eca (patch) | |
tree | 34a08a29e412ec49b795de750f2474cac03aa92b | |
parent | ea540bc21078ffc28435ad5802d2e821036744bd (diff) |
[mlir] Flip to prefixed accessors (NFC)
Missed these in td files.
-rw-r--r-- | mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td | 2 | ||||
-rw-r--r-- | mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td | 8 | ||||
-rw-r--r-- | mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td index e01e30b73bff..1a404b3dbd4a 100644 --- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td +++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td @@ -309,7 +309,7 @@ def LinalgStructuredInterface : OpInterface<"LinalgOp"> { /*args=*/(ins), /*methodBody=*/"", /*defaultImplementation=*/[{ - return $_op.inputs().size(); + return $_op.getInputs().size(); }] >, // `outputs` must be defined by each op that wants to implement the diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td index 80a7262422a6..6380104473fe 100644 --- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td +++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td @@ -64,7 +64,7 @@ def Linalg_InitTensorOp : Linalg_Op<"init_tensor", // Return true if the size of the tensor is dynamic at `idx` bool isDynamicSize(unsigned idx) { - APInt v = *(static_sizes().getAsValueRange<IntegerAttr>().begin() + idx); + APInt v = *(getStaticSizes().getAsValueRange<IntegerAttr>().begin() + idx); return ShapedType::isDynamic(v.getSExtValue()); } @@ -72,7 +72,7 @@ def Linalg_InitTensorOp : Linalg_Op<"init_tensor", // and return the shape. int64_t getStaticSize(unsigned idx) { assert(!isDynamicSize(idx) && "expected static size"); - APInt v = *(static_sizes(). + APInt v = *(getStaticSizes(). template getAsValueRange<IntegerAttr>().begin() + idx); return v.getSExtValue(); } @@ -83,8 +83,8 @@ def Linalg_InitTensorOp : Linalg_Op<"init_tensor", unsigned getIndexOfDynamicSize(unsigned idx) { assert(isDynamicSize(idx) && "expected dynamic size"); return std::count_if( - static_sizes().getValue().begin(), - static_sizes().getValue().begin() + idx, + getStaticSizes().getValue().begin(), + getStaticSizes().getValue().begin() + idx, [&](Attribute attr) { return ShapedType::isDynamic(attr.cast<IntegerAttr>().getInt()); }); diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td index 48743eb66f9c..3a5b87a76499 100644 --- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td +++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td @@ -202,8 +202,8 @@ def GenericOp : LinalgStructuredBase_Op<"generic", [AttrSizedOperandSegments]> { }; } std::string getLibraryCallName() { - return library_call() ? - library_call()->str() : "op_has_no_registered_library_name"; + return getLibraryCall() ? + getLibraryCall()->str() : "op_has_no_registered_library_name"; } static std::function<void(ImplicitLocOpBuilder &, |