[Mlir-commits] [mlir] [mlir] [dataflow] Refactoring the definition of program points in dat… (PR #105656)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Aug 22 06:22:16 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff f2027a9388728094d84837fc0fdd2e0325362e51 814478cfa43aaed25b8211152d5d7b84ef8b7a0a --extensions cpp,h -- mlir/include/mlir/Analysis/DataFlow/DeadCodeAnalysis.h mlir/include/mlir/Analysis/DataFlow/DenseAnalysis.h mlir/include/mlir/Analysis/DataFlow/IntegerRangeAnalysis.h mlir/include/mlir/Analysis/DataFlow/SparseAnalysis.h mlir/include/mlir/Analysis/DataFlowFramework.h mlir/lib/Analysis/DataFlow/DeadCodeAnalysis.cpp mlir/lib/Analysis/DataFlow/DenseAnalysis.cpp mlir/lib/Analysis/DataFlow/IntegerRangeAnalysis.cpp mlir/lib/Analysis/DataFlow/SparseAnalysis.cpp mlir/lib/Analysis/DataFlowFramework.cpp mlir/test/lib/Analysis/DataFlow/TestDeadCodeAnalysis.cpp mlir/test/lib/Analysis/DataFlow/TestDenseDataFlowAnalysis.h mlir/test/lib/Analysis/TestDataFlowFramework.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/mlir/include/mlir/Analysis/DataFlowFramework.h b/mlir/include/mlir/Analysis/DataFlowFramework.h
index 472c5cd540..b0450ecdbd 100644
--- a/mlir/include/mlir/Analysis/DataFlowFramework.h
+++ b/mlir/include/mlir/Analysis/DataFlowFramework.h
@@ -31,9 +31,9 @@ namespace mlir {
 
 /// A result type used to indicate if a change happened. Boolean operations on
 /// ChangeResult behave as though `Change` is truth.
-enum class [[nodiscard]] ChangeResult{
-    NoChange,
-    Change,
+enum class [[nodiscard]] ChangeResult {
+  NoChange,
+  Change,
 };
 inline ChangeResult operator|(ChangeResult lhs, ChangeResult rhs) {
   return lhs == ChangeResult::Change ? lhs : rhs;
@@ -131,7 +131,7 @@ public:
   /// Get a uniqued instance of this lattice anchor class with the given
   /// arguments.
   template <typename... Args>
-  static ConcreteT *get(StorageUniquer &uniquer, Args &&... args) {
+  static ConcreteT *get(StorageUniquer &uniquer, Args &&...args) {
     return uniquer.get<ConcreteT>(/*initFn=*/{}, std::forward<Args>(args)...);
   }
 
@@ -242,7 +242,7 @@ public:
 
   /// Load an analysis into the solver. Return the analysis instance.
   template <typename AnalysisT, typename... Args>
-  AnalysisT *load(Args &&... args);
+  AnalysisT *load(Args &&...args);
 
   /// Initialize the children analyses starting from the provided top-level
   /// operation and run the analysis until fixpoint.
@@ -273,7 +273,7 @@ public:
   /// Get a uniqued lattice anchor instance. If one is not present, it is
   /// created with the provided arguments.
   template <typename AnchorT, typename... Args>
-  AnchorT *getLatticeAnchor(Args &&... args) {
+  AnchorT *getLatticeAnchor(Args &&...args) {
     return AnchorT::get(uniquer, std::forward<Args>(args)...);
   }
 
@@ -464,7 +464,7 @@ protected:
 
   /// Get or create a custom lattice anchor.
   template <typename AnchorT, typename... Args>
-  AnchorT *getLatticeAnchor(Args &&... args) {
+  AnchorT *getLatticeAnchor(Args &&...args) {
     return solver.getLatticeAnchor<AnchorT>(std::forward<Args>(args)...);
   }
 
@@ -503,7 +503,7 @@ private:
 };
 
 template <typename AnalysisT, typename... Args>
-AnalysisT *DataFlowSolver::load(Args &&... args) {
+AnalysisT *DataFlowSolver::load(Args &&...args) {
   childAnalyses.emplace_back(new AnalysisT(*this, std::forward<Args>(args)...));
 #if LLVM_ENABLE_ABI_BREAKING_CHECKS
   childAnalyses.back().get()->debugName = llvm::getTypeName<AnalysisT>();

``````````

</details>


https://github.com/llvm/llvm-project/pull/105656


More information about the Mlir-commits mailing list