9#ifndef LLVM_LIB_TRANSFORMS_OBJCARC_BLOTMAPVECTOR_H
10#define LLVM_LIB_TRANSFORMS_OBJCARC_BLOTMAPVECTOR_H
28 using VectorTy = std::vector<std::pair<KeyT, ValueT>>;
32#ifdef EXPENSIVE_CHECKS
40 for (
typename VectorTy::const_iterator
I =
Vector.begin(),
E =
Vector.end();
42 assert(!
I->first || (Map.count(
I->first) &&
43 Map[
I->first] ==
size_t(
I -
Vector.begin())));
56 std::pair<typename MapTy::iterator, bool> Pair =
57 Map.insert(std::make_pair(Arg,
size_t(0)));
59 size_t Num =
Vector.size();
60 Pair.first->second = Num;
64 return Vector[Pair.first->second].second;
67 std::pair<iterator, bool>
insert(
const std::pair<KeyT, ValueT> &InsertPair) {
68 std::pair<typename MapTy::iterator, bool> Pair =
69 Map.insert(std::make_pair(InsertPair.first,
size_t(0)));
71 size_t Num =
Vector.size();
72 Pair.first->second = Num;
73 Vector.push_back(InsertPair);
74 return std::make_pair(
Vector.begin() + Num,
true);
76 return std::make_pair(
Vector.begin() + Pair.first->second,
false);
83 return Vector.begin() + It->second;
90 return Vector.begin() + It->second;
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file defines the DenseMap class.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
An associative container with fast insertion-order (deterministic) iteration over its elements.
const_iterator begin() const
void blot(const KeyT &Key)
This is similar to erase, but instead of removing the element from the vector, it just zeros out the ...
iterator find(const KeyT &Key)
typename VectorTy::iterator iterator
typename VectorTy::const_iterator const_iterator
ValueT & operator[](const KeyT &Arg)
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &InsertPair)
const_iterator end() const
const_iterator find(const KeyT &Key) const
This is an optimization pass for GlobalISel generic memory operations.