summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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