llvm::GlobalValueSummaryMap

Map from global value GUID to corresponding summary structures.

Synopsis

Declared in <llvm/IR/ModuleSummaryIndex.h>

class GlobalValueSummaryMap;

Description

Use a DenseMap for O(1) lookup and a std::deque for storage. std::deque guarantees that pointers to elements are not invalidated by push_back, which is required because ValueInfo stores a raw pointer to elements of this container.

Types

NameDescription
SortedEntriesRange An owning range over the entries sorted by key, yielding each entry by reference.

Type Aliases

NameDescription
const_iterator Const iterator over map entries.
iterator Mutable iterator over map entries.
key_type GUID key type for the map.
mapped_type Mapped summary-info type for each GUID.
size_type Size type for the map.
value_type Key/value pair type stored in the map.

Member Functions

NameDescription
begin begin overloads
empty Return true if the map contains no entries.
end end overloads
find find overloads
size Return the number of entries in the map.
sortedRange Return an owning range over the entries sorted by key. Storage is in insertion order; some serialization paths and tests rely on key-sorted iteration.
try_emplace Insert a new entry for Key if absent, constructing the mapped value.