[Mlir-commits] [mlir] d7ab71f - Apply clang-tidy fixes for readability-identifier-naming in TosaOps.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Sun Jan 30 11:49:46 PST 2022


Author: Mehdi Amini
Date: 2022-01-30T19:49:23Z
New Revision: d7ab71f7b9a2c6a2a0c3ef530a5cff30730a40bc

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

LOG: Apply clang-tidy fixes for readability-identifier-naming in TosaOps.cpp (NFC)

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp b/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
index f437eb455ca86..11ab8db2dd277 100644
--- a/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
+++ b/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
@@ -538,17 +538,16 @@ struct ClampClampOptimization : public OpRewritePattern<tosa::ClampOp> {
       return failure();
 
     if (tosa::ClampOp clampOp = dyn_cast<tosa::ClampOp>(definingOp)) {
-      auto min_fp = std::max(op.min_fp(), clampOp.min_fp()).convertToFloat();
-      auto max_fp = std::min(op.max_fp(), clampOp.max_fp()).convertToFloat();
+      auto minFp = std::max(op.min_fp(), clampOp.min_fp()).convertToFloat();
+      auto maxFp = std::min(op.max_fp(), clampOp.max_fp()).convertToFloat();
 
-      auto min_int = std::max(op.min_int(), clampOp.min_int());
-      auto max_int = std::min(op.max_int(), clampOp.max_int());
+      auto minInt = std::max(op.min_int(), clampOp.min_int());
+      auto maxInt = std::min(op.max_int(), clampOp.max_int());
 
       rewriter.replaceOpWithNewOp<tosa::ClampOp>(
-          op, op.getType(), clampOp.input(),
-          rewriter.getI64IntegerAttr(min_int),
-          rewriter.getI64IntegerAttr(max_int), rewriter.getF32FloatAttr(min_fp),
-          rewriter.getF32FloatAttr(max_fp));
+          op, op.getType(), clampOp.input(), rewriter.getI64IntegerAttr(minInt),
+          rewriter.getI64IntegerAttr(maxInt), rewriter.getF32FloatAttr(minFp),
+          rewriter.getF32FloatAttr(maxFp));
       return success();
     }
 


        


More information about the Mlir-commits mailing list