[Mlir-commits] [mlir] 9cebb28 - Apply clang-tidy fixes for llvm-qualified-auto in PipelineGlobalOps.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Thu Jan 25 11:33:34 PST 2024


Author: Mehdi Amini
Date: 2024-01-25T11:33:05-08:00
New Revision: 9cebb2857695ed4b7c79db7f31830eaf4d2f3ba4

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

LOG: Apply clang-tidy fixes for llvm-qualified-auto in PipelineGlobalOps.cpp (NFC)

Added: 
    

Modified: 
    mlir/lib/Dialect/MLProgram/Transforms/PipelineGlobalOps.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/MLProgram/Transforms/PipelineGlobalOps.cpp b/mlir/lib/Dialect/MLProgram/Transforms/PipelineGlobalOps.cpp
index 7e00a731f6d731..77c195c9ccfa07 100644
--- a/mlir/lib/Dialect/MLProgram/Transforms/PipelineGlobalOps.cpp
+++ b/mlir/lib/Dialect/MLProgram/Transforms/PipelineGlobalOps.cpp
@@ -38,8 +38,8 @@ class MLProgramPipelineGlobals
 
 // Traverses upwards searchign for the operation mapped by the symbol.
 static Operation *getFromSymbol(Operation *baseOp, SymbolRefAttr symbol) {
-  for (auto op = baseOp; op; op = op->getParentOp()) {
-    auto lookup = SymbolTable::lookupNearestSymbolFrom(op, symbol);
+  for (auto *op = baseOp; op; op = op->getParentOp()) {
+    auto *lookup = SymbolTable::lookupNearestSymbolFrom(op, symbol);
     if (lookup)
       return lookup;
   }
@@ -59,7 +59,7 @@ LogicalResult MLProgramPipelineGlobals::buildGlobalMap(ModuleOp module) {
       }
 
       auto symbol = mlir::dyn_cast<SymbolRefAttr>(callable);
-      auto func = getFromSymbol(op, symbol);
+      auto *func = getFromSymbol(op, symbol);
       callableMap[symbol] = func;
     }
     return WalkResult::advance();
@@ -201,7 +201,7 @@ void MLProgramPipelineGlobals::ProcessBlock(
     }
   }
 
-  for (auto op : toDelete) {
+  for (auto *op : toDelete) {
     op->erase();
   }
 }


        


More information about the Mlir-commits mailing list