[llvm] 8355162 - LoopRotationUtils: Use initializer list instead of repeated push_back (#139312)
via llvm-commits
llvm-commits at lists.llvm.org
Fri May 9 15:21:47 PDT 2025
Author: Matt Arsenault
Date: 2025-05-10T00:21:44+02:00
New Revision: 83551626d0c4d48d3399850ac6dfb432df6176ad
URL: https://github.com/llvm/llvm-project/commit/83551626d0c4d48d3399850ac6dfb432df6176ad
DIFF: https://github.com/llvm/llvm-project/commit/83551626d0c4d48d3399850ac6dfb432df6176ad.diff
LOG: LoopRotationUtils: Use initializer list instead of repeated push_back (#139312)
Added:
Modified:
llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
Removed:
################################################################################
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);
More information about the llvm-commits
mailing list