summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJessica Paquette <jpaquette@apple.com>2018-12-06 00:04:03 +0000
committerJessica Paquette <jpaquette@apple.com>2018-12-06 00:04:03 +0000
commitd4e7d0749bfde91d1f86a1f3adb02079c55a830f (patch)
treebb08af89e4dbb61dc80363509860f1178e576701
parentca3ed964f1aacc9727a39cc22ae7150d791bcf69 (diff)
downloadbcm5719-llvm-d4e7d0749bfde91d1f86a1f3adb02079c55a830f.tar.gz
bcm5719-llvm-d4e7d0749bfde91d1f86a1f3adb02079c55a830f.zip
[MachineOutliner][NFC] Move std::vector out of loop
See http://llvm.org/docs/ProgrammersManual.html#vector llvm-svn: 348433
-rw-r--r--llvm/lib/CodeGen/MachineOutliner.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp b/llvm/lib/CodeGen/MachineOutliner.cpp
index 06eaf1e8690..c5f4766eec2 100644
--- a/llvm/lib/CodeGen/MachineOutliner.cpp
+++ b/llvm/lib/CodeGen/MachineOutliner.cpp
@@ -1015,9 +1015,10 @@ MachineOutliner::findCandidates(InstructionMapper &Mapper,
// First, find dall of the repeated substrings in the tree of minimum length
// 2.
+ std::vector<Candidate> CandidatesForRepeatedSeq;
for (auto It = ST.begin(), Et = ST.end(); It != Et; ++It) {
+ CandidatesForRepeatedSeq.clear();
SuffixTree::RepeatedSubstring RS = *It;
- std::vector<Candidate> CandidatesForRepeatedSeq;
unsigned StringLen = RS.Length;
for (const unsigned &StartIdx : RS.StartIndices) {
unsigned EndIdx = StartIdx + StringLen - 1;
OpenPOWER on IntegriCloud