[Mlir-commits] [mlir] [mlir] Remove unused outer loop (NFC) (PR #127998)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Feb 20 04:22:33 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: laichunfeng (lcvon007)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/127998.diff
1 Files Affected:
- (modified) mlir/lib/Analysis/DataFlowFramework.cpp (+11-15)
``````````diff
diff --git a/mlir/lib/Analysis/DataFlowFramework.cpp b/mlir/lib/Analysis/DataFlowFramework.cpp
index 028decbae31c3..29f57c602f9cb 100644
--- a/mlir/lib/Analysis/DataFlowFramework.cpp
+++ b/mlir/lib/Analysis/DataFlowFramework.cpp
@@ -118,21 +118,17 @@ LogicalResult DataFlowSolver::initializeAndRun(Operation *top) {
}
// Run the analysis until fixpoint.
- do {
- // Exhaust the worklist.
- while (!worklist.empty()) {
- auto [point, analysis] = worklist.front();
- worklist.pop();
-
- DATAFLOW_DEBUG(llvm::dbgs() << "Invoking '" << analysis->debugName
- << "' on: " << point << "\n");
- if (failed(analysis->visit(point)))
- return failure();
- }
-
- // Iterate until all states are in some initialized state and the worklist
- // is exhausted.
- } while (!worklist.empty());
+ // Iterate until all states are in some initialized state and the worklist
+ // is exhausted.
+ while (!worklist.empty()) {
+ auto [point, analysis] = worklist.front();
+ worklist.pop();
+
+ DATAFLOW_DEBUG(llvm::dbgs() << "Invoking '" << analysis->debugName
+ << "' on: " << point << "\n");
+ if (failed(analysis->visit(point)))
+ return failure();
+ }
return success();
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/127998
More information about the Mlir-commits
mailing list