[Mlir-commits] [mlir] 7602e28 - [mlir] Flip to prefixed accessors (NFC)

Jacques Pienaar llvmlistbot at llvm.org
Sun Aug 7 08:46:21 PDT 2022


Author: Jacques Pienaar
Date: 2022-08-07T08:46:15-07:00
New Revision: 7602e285f69c4e3af60629100c151067c27b9eca

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

LOG: [mlir] Flip to prefixed accessors (NFC)

Missed these in td files.

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
    mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
    mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td

Removed: 
    


################################################################################
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 &,


        


More information about the Mlir-commits mailing list