summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-04-25 04:30:06 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-04-25 04:30:06 +0000
commit6f1f9f4c7f8a5de44c2bcd610fa909f17860fbd1 (patch)
treea997f159953790df353207743a55cf3523d5173c /lib
parent573faecacf5277b338f27c541c93c364ff284304 (diff)
downloadllvm-6f1f9f4c7f8a5de44c2bcd610fa909f17860fbd1.tar.gz
llvm-6f1f9f4c7f8a5de44c2bcd610fa909f17860fbd1.tar.bz2
llvm-6f1f9f4c7f8a5de44c2bcd610fa909f17860fbd1.tar.xz
blockfreq: Use a std::list for Loops
As pointed out by David Blaikie in code review, a `std::list<T>` is simpler than a `std::vector<std::unique_ptr<T>>`. Another option is a `std::deque<T>` (which allocates in chunks), but I'd like to leave open the option of inserting in the middle of the sequence for handling irreducible control flow on the fly. <rdar://problem/14292693> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207177 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/BlockFrequencyInfoImpl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/BlockFrequencyInfoImpl.cpp b/lib/Analysis/BlockFrequencyInfoImpl.cpp
index 29a4117c13..42c674983c 100644
--- a/lib/Analysis/BlockFrequencyInfoImpl.cpp
+++ b/lib/Analysis/BlockFrequencyInfoImpl.cpp
@@ -602,7 +602,7 @@ void BlockFrequencyInfoImplBase::clear() {
// does not actually clear heap storage.
std::vector<FrequencyData>().swap(Freqs);
std::vector<WorkingData>().swap(Working);
- std::vector<std::unique_ptr<LoopData>>().swap(Loops);
+ Loops.clear();
}
/// \brief Clear all memory not needed downstream.