[llvm] [LoopFusion] Correction in the comments (NFC) (PR #184689)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 4 13:59:16 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: Ehsan Amiri (amehsan)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/184689.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Scalar/LoopFuse.cpp (+4-6)
``````````diff
diff --git a/llvm/lib/Transforms/Scalar/LoopFuse.cpp b/llvm/lib/Transforms/Scalar/LoopFuse.cpp
index 01fe45a013a63..2f1e1f6095dd7 100644
--- a/llvm/lib/Transforms/Scalar/LoopFuse.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopFuse.cpp
@@ -545,15 +545,13 @@ struct LoopFuser {
collectFusionCandidates(LV);
Changed |= fuseCandidates();
+ // All loops in the candidate sets have a common parent (or not parent).
+ // Next loop vector, will include loops with a different parent. It is
+ // Safe to remove all the candidates currently in the set.
FusionCandidates.clear();
}
- // Finished analyzing candidates at this level.
- // Descend to the next level and clear all of the candidates currently
- // collected. Note that it will not be possible to fuse any of the
- // existing candidates with new candidates because the new candidates will
- // be at a different nest level and thus not be control flow equivalent
- // with all of the candidates collected so far.
+ // Finished analyzing candidates at this level. Descend to the next level.
LLVM_DEBUG(dbgs() << "Descend one level!\n");
LDT.descend();
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/184689
More information about the llvm-commits
mailing list