[llvm] bcf4fa4 - [CodeGen] Use a range-based for loop (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 4 22:27:00 PDT 2022
Author: Kazu Hirata
Date: 2022-06-04T22:26:55-07:00
New Revision: bcf4fa458a993a5165fdc417db4d9fea7c123d0f
URL: https://github.com/llvm/llvm-project/commit/bcf4fa458a993a5165fdc417db4d9fea7c123d0f
DIFF: https://github.com/llvm/llvm-project/commit/bcf4fa458a993a5165fdc417db4d9fea7c123d0f.diff
LOG: [CodeGen] Use a range-based for loop (NFC)
Added:
Modified:
llvm/lib/CodeGen/MachinePipeliner.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/MachinePipeliner.cpp b/llvm/lib/CodeGen/MachinePipeliner.cpp
index 6400a8845ef6..e7573824e5e1 100644
--- a/llvm/lib/CodeGen/MachinePipeliner.cpp
+++ b/llvm/lib/CodeGen/MachinePipeliner.cpp
@@ -1810,8 +1810,7 @@ void SwingSchedulerDAG::addConnectedNodes(SUnit *SU, NodeSet &NewSet,
static bool isIntersect(SmallSetVector<SUnit *, 8> &Set1, const NodeSet &Set2,
SmallSetVector<SUnit *, 8> &Result) {
Result.clear();
- for (unsigned i = 0, e = Set1.size(); i != e; ++i) {
- SUnit *SU = Set1[i];
+ for (SUnit *SU : Set1) {
if (Set2.count(SU) != 0)
Result.insert(SU);
}
More information about the llvm-commits
mailing list