Skip to content

Conversation

arsenm
Copy link
Contributor

@arsenm arsenm commented May 9, 2025

No description provided.

@arsenm arsenm marked this pull request as ready for review May 9, 2025 19:03
Copy link
Contributor Author

arsenm commented May 9, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@llvmbot
Copy link
Member

llvmbot commented May 9, 2025

@llvm/pr-subscribers-llvm-transforms

Author: Matt Arsenault (arsenm)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/139312.diff

1 Files Affected:

  • (modified) llvm/lib/Transforms/Utils/LoopRotationUtils.cpp (+4-4)
diff --git a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
index 73d074029d810..693b1f517f8d0 100644
--- a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
@@ -822,10 +822,10 @@ bool LoopRotate::rotateLoop(Loop *L, bool SimplifiedLatch) {
     if (DT) {
       // The OrigPreheader branches to the NewHeader and Exit now. Then, inform
       // the DT about the removed edge to the OrigHeader (that got removed).
-      SmallVector<DominatorTree::UpdateType, 3> Updates;
-      Updates.push_back({DominatorTree::Insert, OrigPreheader, Exit});
-      Updates.push_back({DominatorTree::Insert, OrigPreheader, NewHeader});
-      Updates.push_back({DominatorTree::Delete, OrigPreheader, OrigHeader});
+      SmallVector<DominatorTree::UpdateType, 3> Updates = {
+          {DominatorTree::Insert, OrigPreheader, Exit},
+          {DominatorTree::Insert, OrigPreheader, NewHeader},
+          {DominatorTree::Delete, OrigPreheader, OrigHeader}};
 
       if (MSSAU) {
         MSSAU->applyUpdates(Updates, *DT, /*UpdateDT=*/true);

Copy link
Contributor

@fhahn fhahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks

@arsenm arsenm merged commit 8355162 into main May 9, 2025
13 of 15 checks passed
@arsenm arsenm deleted the users/arsenm/loop-rotation-utils/initializer-list-instead-of-push-back-x3 branch May 9, 2025 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants