Skip to content

Commit 649ab75

Browse files
kazutakahirataIanWood1
authored andcommitted
[Hexagon] Construct SmallVector with an iterator range (NFC) (llvm#136416)
This patch switches to SmallVector so that we can construct an instance with an iterator range.
1 parent 110d17b commit 649ab75

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,9 +1079,7 @@ bool PolynomialMultiplyRecognize::promoteTypes(BasicBlock *LoopB,
10791079
return false;
10801080

10811081
// Perform the promotion.
1082-
std::vector<Instruction*> LoopIns;
1083-
std::transform(LoopB->begin(), LoopB->end(), std::back_inserter(LoopIns),
1084-
[](Instruction &In) { return &In; });
1082+
SmallVector<Instruction *> LoopIns(llvm::make_pointer_range(*LoopB));
10851083
for (Instruction *In : LoopIns)
10861084
if (!In->isTerminator())
10871085
promoteTo(In, DestTy, LoopB);

0 commit comments

Comments
 (0)