[Mlir-commits] [mlir] 883fccc - [mlir][tosa] Switch missed accessors to prefixed form (NFC)

Jacques Pienaar llvmlistbot at llvm.org
Sun Jul 31 14:06:53 PDT 2022


Author: Jacques Pienaar
Date: 2022-07-31T13:59:19-07:00
New Revision: 883fcccadaa08e0dbf5cbef7a38f00d520c305a8

URL: https://github.com/llvm/llvm-project/commit/883fcccadaa08e0dbf5cbef7a38f00d520c305a8
DIFF: https://github.com/llvm/llvm-project/commit/883fcccadaa08e0dbf5cbef7a38f00d520c305a8.diff

LOG: [mlir][tosa] Switch missed accessors to prefixed form (NFC)

Added: 
    

Modified: 
    mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp b/mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp
index 7b9e9f1580081..d1dcbec32f67e 100644
--- a/mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp
+++ b/mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp
@@ -450,11 +450,11 @@ OpFoldResult ConstOp::fold(ArrayRef<Attribute> operands) {
 
 #define REDUCE_FOLDER(OP)                                                      \
   OpFoldResult OP::fold(ArrayRef<Attribute> operands) {                        \
-    ShapedType inputTy = input().getType().cast<ShapedType>();                 \
+    ShapedType inputTy = getInput().getType().cast<ShapedType>();              \
     if (!inputTy.hasRank())                                                    \
       return {};                                                               \
-    if (inputTy.getDimSize(axis()) == 1)                                       \
-      return input();                                                          \
+    if (inputTy.getDimSize(getAxis()) == 1)                                    \
+      return getInput();                                                       \
     return {};                                                                 \
   }
 


        


More information about the Mlir-commits mailing list