[llvm] 5d7b1a5 - [Scalar] Use llvm::append_range (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 10 23:09:12 PDT 2022
Author: Kazu Hirata
Date: 2022-06-10T23:09:01-07:00
New Revision: 5d7b1a5f1b7ad4add1e6a4b6c43929d171e18544
URL: https://github.com/llvm/llvm-project/commit/5d7b1a5f1b7ad4add1e6a4b6c43929d171e18544
DIFF: https://github.com/llvm/llvm-project/commit/5d7b1a5f1b7ad4add1e6a4b6c43929d171e18544.diff
LOG: [Scalar] Use llvm::append_range (NFC)
Added:
Modified:
llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
index ed33354a9fc3f..273ebe0659e9d 100644
--- a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
+++ b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
@@ -2804,8 +2804,7 @@ static bool unswitchBestCondition(
PartialIVInfo = *Info;
PartialIVCondBranch = L.getHeader()->getTerminator();
TinyPtrVector<Value *> ValsToDuplicate;
- for (auto *Inst : Info->InstToDuplicate)
- ValsToDuplicate.push_back(Inst);
+ llvm::append_range(ValsToDuplicate, Info->InstToDuplicate);
UnswitchCandidates.push_back(
{L.getHeader()->getTerminator(), std::move(ValsToDuplicate)});
}
More information about the llvm-commits
mailing list