15#ifndef LLVM_PROFILEDATA_HASHKEYMAP_H
16#define LLVM_PROFILEDATA_HASHKEYMAP_H
50template <
template <
typename,
typename,
typename...>
typename MapT,
51 typename KeyT,
typename ValueT,
typename... MapTArgs>
53 public MapT<decltype(hash_value(KeyT())), ValueT, MapTArgs...> {
64 template <
typename... Ts>
69 return base_type::try_emplace(Hash, std::forward<Ts>(Args)...);
72 template <
typename... Ts>
78 template <
typename... Ts> std::pair<iterator, bool>
emplace(Ts &&...Args) {
88 if (It != base_type::end())
90 return base_type::end();
95 if (It != base_type::end())
97 return base_type::end();
102 if (It != base_type::end())
113 if (It != base_type::end()) {
114 base_type::erase(It);
121 return base_type::erase(It);
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This class is a wrapper to associative container MapT<KeyT, ValueT> using the hash value of the origi...
MapT< decltype(hash_value(KeyT())), ValueT, MapTArgs... > base_type
std::pair< iterator, bool > emplace(Ts &&...Args)
std::pair< iterator, bool > try_emplace(const key_type &Hash, const original_key_type &Key, Ts &&...Args)
typename base_type::iterator iterator
const_iterator find(const original_key_type &Key) const
typename base_type::value_type value_type
std::pair< iterator, bool > try_emplace(const original_key_type &Key, Ts &&...Args)
decltype(hash_value(KeyT())) key_type
size_t erase(const original_key_type &Ctx)
mapped_type & operator[](const original_key_type &Key)
size_t count(const original_key_type &Key) const
iterator find(const original_key_type &Key)
mapped_type lookup(const original_key_type &Key) const
typename base_type::const_iterator const_iterator
iterator erase(const_iterator It)
uint64_t hash_value(const FunctionId &Obj)
This is an optimization pass for GlobalISel generic memory operations.