LLVM 24.0.0git
llvm::orc::detail::WaitingOnGraph< ContainerIdT, ElementIdT >::ContainerElementsMap Class Reference

#include "llvm/ExecutionEngine/Orc/WaitingOnGraph.h"

Inheritance diagram for llvm::orc::detail::WaitingOnGraph< ContainerIdT, ElementIdT >::ContainerElementsMap:
[legend]

Public Member Functions

bool merge (const ContainerElementsMap &Other, bool AssertNoElementsOverlap=false)
 Merge the elements of Other into this map.
bool remove (const ContainerElementsMap &Other)
 Remove all elements in Other from this map.
template<typename Visitor>
bool visit (Visitor &&V)
 Call V on each (Container, Elements) pair in this map.
Public Member Functions inherited from llvm::DenseMapBase< StorageT, KeyT, ValueT, KeyInfoT, BucketT >
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
auto keys ()
auto values ()
auto keys () const
auto values () const
bool empty () const
unsigned size () const
void reserve (size_type NumEntries)
 Grow the densemap so that it can contain at least NumEntries items before resizing again.
void clear ()
void shrink_and_clear ()
bool contains (const_arg_type_t< KeyT > Val) const
 Return true if the specified key is in the map, false otherwise.
size_type count (const_arg_type_t< KeyT > Val) const
 Return 1 if the specified key is in the map, 0 otherwise.
iterator find (const_arg_type_t< KeyT > Val)
const_iterator find (const_arg_type_t< KeyT > Val) const
template<class LookupKeyT>
iterator find_as (const LookupKeyT &Val)
 Alternate version of find() which allows a different, and possibly less expensive, key type.
template<class LookupKeyT>
const_iterator find_as (const LookupKeyT &Val) const
ValueT lookup (const_arg_type_t< KeyT > Val) const
 Return the entry for the specified key, or a default constructed value if no such entry exists.
template<typename U = std::remove_cv_t<ValueT>>
ValueT lookup_or (const_arg_type_t< KeyT > Val, U &&Default) const
ValueT & at (const_arg_type_t< KeyT > Val)
 Return the entry for the specified key, or abort if no such entry exists.
const ValueT & at (const_arg_type_t< KeyT > Val) const
 Return the entry for the specified key, or abort if no such entry exists.
std::pair< iterator, bool > insert (const std::pair< KeyT, ValueT > &KV)
std::pair< iterator, bool > insert (std::pair< KeyT, ValueT > &&KV)
template<typename B = BucketT, typename = std::enable_if_t<!std::is_same_v<B, std::pair<KeyT, ValueT>>>>
std::pair< iterator, bool > insert (const BucketT &KV)
template<typename B = BucketT, typename = std::enable_if_t<!std::is_same_v<B, std::pair<KeyT, ValueT>>>>
std::pair< iterator, bool > insert (BucketT &&KV)
template<typename... Ts>
std::pair< iterator, bool > try_emplace (KeyT &&Key, Ts &&...Args)
template<typename... Ts>
std::pair< iterator, bool > try_emplace (const KeyT &Key, Ts &&...Args)
template<typename LookupKeyT>
std::pair< iterator, bool > insert_as (std::pair< KeyT, ValueT > &&KV, const LookupKeyT &Val)
 Alternate version of insert() which allows a different, and possibly less expensive, key type.
template<typename InputIt>
void insert (InputIt I, InputIt E)
 Range insertion of pairs.
template<typename Range>
void insert_range (Range &&R)
 Inserts range of 'std::pair<KeyT, ValueT>' values into the map.
template<typename V>
std::pair< iterator, bool > insert_or_assign (const KeyT &Key, V &&Val)
template<typename V>
std::pair< iterator, bool > insert_or_assign (KeyT &&Key, V &&Val)
template<typename... Ts>
std::pair< iterator, bool > emplace_or_assign (const KeyT &Key, Ts &&...Args)
template<typename... Ts>
std::pair< iterator, bool > emplace_or_assign (KeyT &&Key, Ts &&...Args)
bool erase (const KeyT &Val)
void erase (iterator I)
template<typename Predicate>
bool remove_if (Predicate Pred)
 Remove entries that match the given predicate.
ValueT & operator[] (const KeyT &Key)
ValueT & operator[] (KeyT &&Key)
void swap (DenseMapBase &RHS)
 DenseMapBase ()
 DenseMapBase (unsigned NumElementsToReserve)
 Create a DenseMap with an optional NumElementsToReserve to guarantee that this number of elements can be inserted in the map without grow().
 DenseMapBase (const DenseMapBase &other)
 DenseMapBase (DenseMapBase &&other)
template<typename InputIt>
 DenseMapBase (const InputIt &I, const InputIt &E)
template<typename RangeT>
 DenseMapBase (llvm::from_range_t, const RangeT &Range)
 DenseMapBase (std::initializer_list< value_type > Vals)
 ~DenseMapBase ()
DenseMapBase & operator= (const DenseMapBase &other)
DenseMapBase & operator= (DenseMapBase &&other)
size_t getMemorySize () const
 Return the approximate size (in bytes) of the actual map.
Public Member Functions inherited from llvm::DebugEpochBase
void incrementEpoch ()

Friends

class ContainerElementsMapTest

Additional Inherited Members

Public Types inherited from llvm::DenseMapBase< StorageT, KeyT, ValueT, KeyInfoT, BucketT >
using size_type = unsigned
using key_type = KeyT
using mapped_type = ValueT
using value_type = BucketT
using iterator = DenseMapIterator<KeyT, ValueT, KeyInfoT, BucketT>
using const_iterator

Detailed Description

template<typename ContainerIdT, typename ElementIdT>
class llvm::orc::detail::WaitingOnGraph< ContainerIdT, ElementIdT >::ContainerElementsMap

Definition at line 149 of file WaitingOnGraph.h.

Member Function Documentation

◆ merge()

template<typename ContainerIdT, typename ElementIdT>
bool llvm::orc::detail::WaitingOnGraph< ContainerIdT, ElementIdT >::ContainerElementsMap::merge ( const ContainerElementsMap & Other,
bool AssertNoElementsOverlap = false )
inline

Merge the elements of Other into this map.

Returns true if any new elements are added.

Definition at line 157 of file WaitingOnGraph.h.

References Changed, and llvm::Other.

◆ remove()

template<typename ContainerIdT, typename ElementIdT>
bool llvm::orc::detail::WaitingOnGraph< ContainerIdT, ElementIdT >::ContainerElementsMap::remove ( const ContainerElementsMap & Other)
inline

Remove all elements in Other from this map.

Returns true if any elements were removed.

Definition at line 167 of file WaitingOnGraph.h.

References assert(), Changed, llvm::DenseMapBase< StorageT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::erase(), llvm::find(), I, and llvm::Other.

Referenced by llvm::orc::detail::WaitingOnGraph< ContainerIdT, ElementIdT >::SuperNodeBuilder::add().

◆ visit()

template<typename ContainerIdT, typename ElementIdT>
template<typename Visitor>
bool llvm::orc::detail::WaitingOnGraph< ContainerIdT, ElementIdT >::ContainerElementsMap::visit ( Visitor && V)
inline

Call V on each (Container, Elements) pair in this map.

V should return true if it modifies any elements.

Returns true if V returns true for any pair.

Definition at line 186 of file WaitingOnGraph.h.

References assert(), Changed, llvm::DenseMapBase< StorageT, KeyT, ValueT, KeyInfoT, BucketT >::empty(), llvm::erase(), and ToRemove.

◆ ContainerElementsMapTest

template<typename ContainerIdT, typename ElementIdT>
friend class ContainerElementsMapTest
friend

Definition at line 150 of file WaitingOnGraph.h.

References ContainerElementsMapTest.

Referenced by ContainerElementsMapTest.


The documentation for this class was generated from the following file: