Skip to content

Commit 9705010

Browse files
[Vectorize] Avoid repeated hash lookups (NFC) (#131962)
1 parent fc278e4 commit 9705010

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3084,7 +3084,7 @@ void LoopVectorizationCostModel::collectLoopScalars(ElementCount VF) {
30843084
// since that would result in generation of scalarized code during execution,
30853085
// which is not supported for scalable vectors.
30863086
if (VF.isScalable()) {
3087-
Scalars[VF].insert(Uniforms[VF].begin(), Uniforms[VF].end());
3087+
Scalars[VF].insert_range(Uniforms[VF]);
30883088
return;
30893089
}
30903090

@@ -3151,7 +3151,7 @@ void LoopVectorizationCostModel::collectLoopScalars(ElementCount VF) {
31513151
//
31523152
// (1) Add to the worklist all instructions that have been identified as
31533153
// uniform-after-vectorization.
3154-
Worklist.insert(Uniforms[VF].begin(), Uniforms[VF].end());
3154+
Worklist.insert_range(Uniforms[VF]);
31553155

31563156
// (2) Add to the worklist all bitcast and getelementptr instructions used by
31573157
// memory accesses requiring a scalar use. The pointer operands of loads and

0 commit comments

Comments
 (0)