summaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp b/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
index b58b906465e5..c1e5ab1a2b56 100644
--- a/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+++ b/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
@@ -44,6 +44,7 @@
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/Utils/Cloning.h"
+#include <deque>
#include <sstream>
#include <unordered_map>
#include <vector>
@@ -568,13 +569,13 @@ private:
/// unioning their recorded alloc types.
uint8_t computeAllocType(DenseSet<uint32_t> &ContextIds);
- /// Returns the alloction type of the intersection of the contexts of two
+ /// Returns the allocation type of the intersection of the contexts of two
/// nodes (based on their provided context id sets), optimized for the case
/// when Node1Ids is smaller than Node2Ids.
uint8_t intersectAllocTypesImpl(const DenseSet<uint32_t> &Node1Ids,
const DenseSet<uint32_t> &Node2Ids);
- /// Returns the alloction type of the intersection of the contexts of two
+ /// Returns the allocation type of the intersection of the contexts of two
/// nodes (based on their provided context id sets).
uint8_t intersectAllocTypes(const DenseSet<uint32_t> &Node1Ids,
const DenseSet<uint32_t> &Node2Ids);
@@ -2574,8 +2575,7 @@ void CallsiteContextGraph<DerivedCCG, FuncTy, CallTy>::
for (auto &Edge : CallerEdges) {
// Skip any that have been removed by an earlier recursive call.
if (Edge->Callee == nullptr && Edge->Caller == nullptr) {
- assert(!std::count(Node->CallerEdges.begin(), Node->CallerEdges.end(),
- Edge));
+ assert(!is_contained(Node->CallerEdges, Edge));
continue;
}
recursivelyRemoveNoneTypeCalleeEdges(Edge->Caller, Visited);