summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
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
commitfc7dc930318ced3246bdab82068910da1059a4e6 (patch)
treeb05dec436858620ce55e42e9509159524a555451 /llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
parente6cb63e471c56fa7e90916ec81da76a2604e388f (diff)
downloadbcm5719-llvm-fc7dc930318ced3246bdab82068910da1059a4e6.tar.gz
bcm5719-llvm-fc7dc930318ced3246bdab82068910da1059a4e6.zip
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> llvm-svn: 207177
Diffstat (limited to 'llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp')
-rw-r--r--llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp b/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
index 29a4117c130..42c674983c4 100644
--- a/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud