[Mlir-commits] [mlir] 55d4c69 - [mlir][analysis] Cleanup collectUnderlyingAddressValues (NFC) (#177905)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Jan 26 00:51:49 PST 2026
Author: lonely eagle
Date: 2026-01-26T16:51:44+08:00
New Revision: 55d4c694a9c6cf1091026b1c71c4acab791b1029
URL: https://github.com/llvm/llvm-project/commit/55d4c694a9c6cf1091026b1c71c4acab791b1029
DIFF: https://github.com/llvm/llvm-project/commit/55d4c694a9c6cf1091026b1c71c4acab791b1029.diff
LOG: [mlir][analysis] Cleanup collectUnderlyingAddressValues (NFC) (#177905)
Added:
Modified:
mlir/lib/Analysis/AliasAnalysis/LocalAliasAnalysis.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Analysis/AliasAnalysis/LocalAliasAnalysis.cpp b/mlir/lib/Analysis/AliasAnalysis/LocalAliasAnalysis.cpp
index b698756dd75e9..5a4679ef31422 100644
--- a/mlir/lib/Analysis/AliasAnalysis/LocalAliasAnalysis.cpp
+++ b/mlir/lib/Analysis/AliasAnalysis/LocalAliasAnalysis.cpp
@@ -170,24 +170,16 @@ static void collectUnderlyingAddressValues(BlockArgument arg, unsigned maxDepth,
// the entry block.
SmallVector<RegionSuccessor> successors;
branch.getSuccessorRegions(RegionBranchPoint::parent(), successors);
- RegionSuccessor regionSuccessor(region);
- bool found = false;
for (RegionSuccessor &successor : successors) {
if (successor.getSuccessor() == region) {
LDBG() << " Found matching region successor: " << successor;
- found = true;
- regionSuccessor = successor;
- break;
+ return collectUnderlyingAddressValues2(
+ branch, successor, arg, argNumber, maxDepth, visited, output);
}
}
- if (!found) {
- LDBG()
- << " No matching region successor found, adding argument to output";
- output.push_back(arg);
- return;
- }
- return collectUnderlyingAddressValues2(
- branch, regionSuccessor, arg, argNumber, maxDepth, visited, output);
+ LDBG() << " No matching region successor found, adding argument to output";
+ output.push_back(arg);
+ return;
}
LDBG()
More information about the Mlir-commits
mailing list