struct SparseMultiSet::SMSNode

Declaration

struct SparseMultiSet::SMSNode { /* full declaration omitted */ };

Description

The actual data that's stored, as a doubly-linked list implemented via indices into the DenseVector. The doubly linked list is implemented circular in Prev indices, and INVALID-terminated in Next indices. This provides efficient access to list tails. These nodes can also be tombstones, in which case they are actually nodes in a single-linked freelist of recyclable slots.

Declared at: llvm/include/llvm/ADT/SparseMultiSet.h:96

Member Variables

public ValueT Data
public unsigned int Prev
public unsigned int Next
public static const unsigned int INVALID = ~0U

Method Overview

Methods

SMSNode(ValueT D, unsigned int P, unsigned int N)

Declared at: llvm/include/llvm/ADT/SparseMultiSet.h:103

Parameters

ValueT D
unsigned int P
unsigned int N

bool isTail() const

Description

List tails have invalid Nexts.

Declared at: llvm/include/llvm/ADT/SparseMultiSet.h:106

bool isTombstone() const

Description

Whether this node is a tombstone node, and thus is in our freelist.

Declared at: llvm/include/llvm/ADT/SparseMultiSet.h:111

bool isValid() const

Description

Since the list is circular in Prev, all non-tombstone nodes have a valid Prev.

Declared at: llvm/include/llvm/ADT/SparseMultiSet.h:117