llvm::df_iterator_default_set

Default visited-node set for depth-first iteration.

Synopsis

Declared in <llvm/ADT/DepthFirstIterator.h>

template<
    typename NodeRef,
    unsigned int SmallSize = 8>
struct df_iterator_default_set
    : SmallPtrSet<NodeRef, SmallSize>

Description

The visited state for the iteration is a simple set augmented with one more method, completed, which is invoked when all children of a node have been processed. It is intended to distinguish back and cross edges in the spanning tree but is not used in the common case.

Base Classes

NameDescription
SmallPtrSet<NodeRef, SmallSize>A set of pointers optimized for holding SmallSize or fewer elements.

Types

NameDescription
HandleBase Empty stub of HandleBase used when ABI-breaking checks are disabled.

Type Aliases

NameDescription
BaseSet Underlying SmallPtrSet used to track visited nodes.
const_iterator Const forward iterator over set elements.
iterator Iterator over elements in the visited set.
key_type Key type used for lookup and comparison.
size_type Unsigned type used to express set size and capacity.
value_type Stored element type.

Member Functions

NameDescription
operator= Assignment operators
begin Return an iterator to the first element, skipping empty hash-table slots.
capacity Return the allocated bucket count of the current representation.
clear Remove all elements from the set.
completed Called when depth-first descent finishes all children of a node.
contains Return true if Ptr is an element of the set.
count count - Return 1 if the specified pointer is in the set, 0 otherwise.
empty Return true if the set contains no elements.
end Return an iterator past the last element.
erase Remove Ptr from the set.
find Return an iterator to Ptr, or end() if it is not in the set.
incrementEpoch No-op when ABI-breaking checks are disabled.
insert insert overloads
insert_range Insert each pointer from range R using ADL begin/end.
remove_if Remove elements that match the given predicate.
reserve Ensure the set can hold at least NewNumEntries elements without rehashing on subsequent inserts.
size Return the number of pointers stored in the set.
swap Swap the elements of this set with RHS.

Protected Member Functions

NameDescription
EndPointer Return a pointer one past the last valid bucket for iteration.
Grow Allocate a larger backing store for the buckets and move entries over.
buckets Iterate over all buckets in the current representation.
contains_imp Return true if Ptr is in the set.
copyFrom Replace this set's contents with a copy of RHS.
eraseFromBucket Erase the entry at Bucket and close the resulting hole via Knuth TAOCP 6.4 Algorithm R. Caller must update NumEntries and the epoch.
erase_imp Erase Ptr from the set if present.
find_imp Return a raw bucket pointer for constructing an iterator to Ptr.
insert_imp Insert Ptr into the set if absent.
isSmall Return true when the set uses inline small-mode storage.
moveFrom Replace this set's contents by moving from RHS.
small_buckets Iterate over occupied slots in small-mode storage.
swap Swap the elements of this set with RHS.

Protected Static Member Functions

NameDescription
getEmptyMarker Sentinel pointer value marking unused hash-table slots.

Protected Data Members

NameDescription
CurArray The current set of buckets, in either small or big representation.
CurArraySize CurArraySize - The allocated size of CurArray, always a power of two.
IsSmall Whether the set is in small representation.
NumEntries Number of elements in CurArray that contain a value. If small, all these elements are at the beginning of CurArray and the rest is uninitialized.

Protected Using Declarations

NameDescription
SmallPtrSetImpl Forward base-class constructors to derived SmallPtrSet types.

Non-Member Functions

NameDescription
MergeBlockSuccessorsIntoGivenBlocksMerge successors of the given blocks into them when possible.
operator!=Return true if LHS and RHS do not contain the same pointers.
operator==Return true if LHS and RHS contain the same pointers.