[Mlir-commits] [mlir] e8231ea - Simplify looping over Operation users in SliceAnalysis (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Fri Feb 3 16:47:25 PST 2023
Author: Mehdi Amini
Date: 2023-02-03T16:46:46-08:00
New Revision: e8231eaa154396c5ff3c29314cdca8f2e0118200
URL: https://github.com/llvm/llvm-project/commit/e8231eaa154396c5ff3c29314cdca8f2e0118200
DIFF: https://github.com/llvm/llvm-project/commit/e8231eaa154396c5ff3c29314cdca8f2e0118200.diff
LOG: Simplify looping over Operation users in SliceAnalysis (NFC)
Added:
Modified:
mlir/lib/Analysis/SliceAnalysis.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Analysis/SliceAnalysis.cpp b/mlir/lib/Analysis/SliceAnalysis.cpp
index 8b098b5e8ce61..ebaf1fc00a6e4 100644
--- a/mlir/lib/Analysis/SliceAnalysis.cpp
+++ b/mlir/lib/Analysis/SliceAnalysis.cpp
@@ -176,10 +176,8 @@ static void dfsPostorder(Operation *root, DFSState *state) {
while (!queue.empty()) {
Operation *current = queue.pop_back_val();
ops.push_back(current);
- for (Value result : current->getResults()) {
- for (Operation *op : result.getUsers())
- queue.push_back(op);
- }
+ for (Operation *op : current->getUsers())
+ queue.push_back(op);
for (Region ®ion : current->getRegions()) {
for (Operation &op : region.getOps())
queue.push_back(&op);
More information about the Mlir-commits
mailing list