[llvm] 42e7796 - [ARM] Add a comment about fixupImmediateBr updaing ImmBranches. NFC
David Green via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 1 07:01:30 PDT 2025
Author: David Green
Date: 2025-07-01T15:01:25+01:00
New Revision: 42e779692027e1bdcb8085b37b428011328c43c8
URL: https://github.com/llvm/llvm-project/commit/42e779692027e1bdcb8085b37b428011328c43c8
DIFF: https://github.com/llvm/llvm-project/commit/42e779692027e1bdcb8085b37b428011328c43c8.diff
LOG: [ARM] Add a comment about fixupImmediateBr updaing ImmBranches. NFC
To prevent people from modernizing the loop, add a comment that
fixupImmediateBr can append to ImmBranches.
Added:
Modified:
llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp b/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
index ca3dc15ff3ad6..ef690838f0f3b 100644
--- a/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
+++ b/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
@@ -476,8 +476,10 @@ bool ARMConstantIslands::runOnMachineFunction(MachineFunction &mf) {
LLVM_DEBUG(dbgs() << "Beginning BR iteration #" << NoBRIters << '\n');
bool BRChange = false;
- for (unsigned i = 0, e = ImmBranches.size(); i != e; ++i)
+ for (unsigned i = 0, e = ImmBranches.size(); i != e; ++i) {
+ // Note: fixupImmediateBr can append to ImmBranches.
BRChange |= fixupImmediateBr(ImmBranches[i]);
+ }
if (BRChange && ++NoBRIters > 30)
report_fatal_error("Branch Fix Up pass failed to converge!");
LLVM_DEBUG(dumpBBs());
More information about the llvm-commits
mailing list