LLVM 22.0.0git
MCPseudoProbe.h
Go to the documentation of this file.
1//===- MCPseudoProbe.h - Pseudo probe encoding support ---------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file contains the declaration of the MCPseudoProbe to support the pseudo
10// probe encoding for AutoFDO. Pseudo probes together with their inline context
11// are encoded in a DFS recursive way in the .pseudoprobe sections. For each
12// .pseudoprobe section, the encoded binary data consist of a single or mutiple
13// function records each for one outlined function. A function record has the
14// following format :
15//
16// FUNCTION BODY (one for each outlined function present in the text section)
17// GUID (uint64)
18// GUID of the function's source name which may be different from the
19// actual binary linkage name. This GUID will be used to decode and
20// generate a profile against the source function name.
21// NPROBES (ULEB128)
22// Number of probes originating from this function.
23// NUM_INLINED_FUNCTIONS (ULEB128)
24// Number of callees inlined into this function, aka number of
25// first-level inlinees
26// PROBE RECORDS
27// A list of NPROBES entries. Each entry contains:
28// INDEX (ULEB128)
29// TYPE (uint4)
30// 0 - block probe, 1 - indirect call, 2 - direct call
31// ATTRIBUTE (uint3)
32// 1 - reserved
33// 2 - Sentinel
34// 4 - HasDiscriminator
35// ADDRESS_TYPE (uint1)
36// 0 - code address for regular probes (for downwards compatibility)
37// - GUID of linkage name for sentinel probes
38// 1 - address delta
39// CODE_ADDRESS (uint64 or ULEB128)
40// code address or address delta, depending on ADDRESS_TYPE
41// DISCRIMINATOR (ULEB128) if HasDiscriminator
42// INLINED FUNCTION RECORDS
43// A list of NUM_INLINED_FUNCTIONS entries describing each of the inlined
44// callees. Each record contains:
45// INLINE SITE
46// ID of the callsite probe (ULEB128)
47// FUNCTION BODY
48// A FUNCTION BODY entry describing the inlined function.
49//
50// TODO: retire the ADDRESS_TYPE encoding for code addresses once compatibility
51// is no longer an issue.
52//===----------------------------------------------------------------------===//
53
54#ifndef LLVM_MC_MCPSEUDOPROBE_H
55#define LLVM_MC_MCPSEUDOPROBE_H
56
57#include "llvm/ADT/ArrayRef.h"
58#include "llvm/ADT/DenseMap.h"
59#include "llvm/ADT/DenseSet.h"
61#include "llvm/ADT/StringRef.h"
62#include "llvm/ADT/iterator.h"
63#include "llvm/IR/PseudoProbe.h"
67#include <functional>
68#include <memory>
69#include <string>
70#include <tuple>
71#include <type_traits>
72#include <unordered_map>
73#include <vector>
74
75namespace llvm {
76
77class MCSymbol;
78class MCObjectStreamer;
79class raw_ostream;
80
82 // If set, indicates that the probe is encoded as an address delta
83 // instead of a real code address.
84 AddressDelta = 0x1,
85};
86
87// Function descriptor decoded from .pseudo_probe_desc section
92
94 : FuncGUID(GUID), FuncHash(Hash), FuncName(Name){};
95
97};
98
99class MCDecodedPseudoProbe;
100
101// An inline frame has the form <CalleeGuid, ProbeID>
102using InlineSite = std::tuple<uint64_t, uint32_t>;
104// GUID to PseudoProbeFuncDesc map
105class GUIDProbeFunctionMap : public std::vector<MCPseudoProbeFuncDesc> {
106public:
107 auto find(uint64_t GUID) const {
108 auto CompareDesc = [](const MCPseudoProbeFuncDesc &Desc, uint64_t GUID) {
109 return Desc.FuncGUID < GUID;
110 };
111 auto It = llvm::lower_bound(*this, GUID, CompareDesc);
112 if (It->FuncGUID != GUID)
113 return end();
114 return It;
115 }
116};
117
118class MCDecodedPseudoProbeInlineTree;
119
121protected:
126 // The value should be equal to PseudoProbeReservedId::Last + 1 which is
127 // defined in SampleProfileProbe.h. The header file is not included here to
128 // reduce the dependency from MC to IPO.
129 const static uint32_t PseudoProbeFirstId = 1;
130
131public:
133 : Index(I), Discriminator(D), Attributes(At), Type(T) {}
134
135 bool isEntry() const { return Index == PseudoProbeFirstId; }
136
137 uint32_t getIndex() const { return Index; }
138
140
141 uint8_t getAttributes() const { return Attributes; }
142
143 uint8_t getType() const { return Type; }
144
145 bool isBlock() const {
146 return Type == static_cast<uint8_t>(PseudoProbeType::Block);
147 }
148
149 bool isIndirectCall() const {
150 return Type == static_cast<uint8_t>(PseudoProbeType::IndirectCall);
151 }
152
153 bool isDirectCall() const {
154 return Type == static_cast<uint8_t>(PseudoProbeType::DirectCall);
155 }
156
157 bool isCall() const { return isIndirectCall() || isDirectCall(); }
158
159 void setAttributes(uint8_t Attr) { Attributes = Attr; }
160};
161
162/// Instances of this class represent a pseudo probe instance for a pseudo probe
163/// table entry, which is created during a machine instruction is assembled and
164/// uses an address from a temporary label created at the current address in the
165/// current section.
167 uint64_t Guid;
168 MCSymbol *Label;
169
170public:
174 Label(Label) {
175 assert(Type <= 0xFF && "Probe type too big to encode, exceeding 2^8");
176 assert(Attributes <= 0xFF &&
177 "Probe attributes too big to encode, exceeding 2^16");
178 }
179
180 uint64_t getGuid() const { return Guid; };
181 MCSymbol *getLabel() const { return Label; }
182 LLVM_ABI void emit(MCObjectStreamer *MCOS,
183 const MCPseudoProbe *LastProbe) const;
184};
185
186// Represents a callsite with caller function name and probe id
187using MCPseudoProbeFrameLocation = std::pair<StringRef, uint32_t>;
188
190 uint64_t Address;
192
193public:
196 : MCPseudoProbeBase(I, At, static_cast<uint8_t>(K), D), Address(Ad),
197 InlineTree(Tree){};
198 LLVM_ABI uint64_t getGuid() const;
199
200 uint64_t getAddress() const { return Address; }
201
203
205 return InlineTree;
206 }
207
208 // Get the inlined context by traversing current inline tree backwards,
209 // each tree node has its InlineSite which is taken as the context.
210 // \p ContextStack is populated in root to leaf order
211 LLVM_ABI void
213 const GUIDProbeFunctionMap &GUID2FuncMAP) const;
214
215 // Helper function to get the string from context stack
216 LLVM_ABI std::string
217 getInlineContextStr(const GUIDProbeFunctionMap &GUID2FuncMAP) const;
218
219 // Print pseudo probe while disassembling
220 LLVM_ABI void print(raw_ostream &OS, const GUIDProbeFunctionMap &GUID2FuncMAP,
221 bool ShowName) const;
222};
223
224// Address to pseudo probes map.
226 : public std::vector<std::reference_wrapper<MCDecodedPseudoProbe>> {
227 auto getIt(uint64_t Addr) const {
228 auto CompareProbe = [](const MCDecodedPseudoProbe &Probe, uint64_t Addr) {
229 return Probe.getAddress() < Addr;
230 };
231 return llvm::lower_bound(*this, Addr, CompareProbe);
232 }
233
234public:
235 // Returns range of probes within [\p From, \p To) address range.
236 auto find(uint64_t From, uint64_t To) const {
237 return llvm::make_range(getIt(From), getIt(To));
238 }
239 // Returns range of probes with given \p Address.
240 auto find(uint64_t Address) const {
241 auto FromIt = getIt(Address);
242 if (FromIt == end() || FromIt->get().getAddress() != Address)
243 return llvm::make_range(end(), end());
244 auto ToIt = getIt(Address + 1);
245 return llvm::make_range(FromIt, ToIt);
246 }
247};
248
249template <typename ProbesType, typename DerivedProbeInlineTreeType,
250 typename InlinedProbeTreeMap>
252protected:
253 // Track children (e.g. inlinees) of current context
254 InlinedProbeTreeMap Children;
255 // Set of probes that come with the function.
256 ProbesType Probes;
258 static_assert(std::is_base_of<MCPseudoProbeInlineTreeBase,
259 DerivedProbeInlineTreeType>::value,
260 "DerivedProbeInlineTreeType must be subclass of "
261 "MCPseudoProbeInlineTreeBase");
262 }
263
264public:
266
267 // Root node has a GUID 0.
268 bool isRoot() const { return Guid == 0; }
269 InlinedProbeTreeMap &getChildren() { return Children; }
270 const InlinedProbeTreeMap &getChildren() const { return Children; }
271 const ProbesType &getProbes() const { return Probes; }
272 // Caller node of the inline site
273 MCPseudoProbeInlineTreeBase<ProbesType, DerivedProbeInlineTreeType,
274 InlinedProbeTreeMap> *Parent = nullptr;
275 DerivedProbeInlineTreeType *getOrAddNode(const InlineSite &Site) {
276 auto Ret = Children.emplace(
277 Site, std::make_unique<DerivedProbeInlineTreeType>(Site));
278 Ret.first->second->Parent = this;
279 return Ret.first->second.get();
280 };
281};
282
283// A Tri-tree based data structure to group probes by inline stack.
284// A tree is allocated for a standalone .text section. A fake
285// instance is created as the root of a tree.
286// A real instance of this class is created for each function, either a
287// not inlined function that has code in .text section or an inlined function.
289 uint64_t operator()(const InlineSite &Site) const {
290 return std::get<0>(Site) ^ std::get<1>(Site);
291 }
292};
295 std::vector<MCPseudoProbe>, MCPseudoProbeInlineTree,
296 std::unordered_map<InlineSite,
297 std::unique_ptr<MCPseudoProbeInlineTree>,
298 InlineSiteHash>> {
299public:
303 this->Guid = std::get<0>(Site);
304 }
305
306 // MCPseudoProbeInlineTree method based on Inlinees
307 LLVM_ABI void addPseudoProbe(const MCPseudoProbe &Probe,
308 const MCPseudoProbeInlineStack &InlineStack);
309 LLVM_ABI void emit(MCObjectStreamer *MCOS, const MCPseudoProbe *&LastProbe);
310};
311
312// inline tree node for the decoded pseudo probe
315 MCDecodedPseudoProbe *, MCDecodedPseudoProbeInlineTree,
316 MutableArrayRef<MCDecodedPseudoProbeInlineTree>> {
317 uint32_t NumProbes = 0;
318 uint32_t ProbeId = 0;
319
320public:
324 : ProbeId(std::get<1>(Site)) {
325 this->Guid = std::get<0>(Site);
326 this->Parent = Parent;
327 }
328
329 // Return false if it's a dummy inline site
330 bool hasInlineSite() const { return !isRoot() && !Parent->isRoot(); }
331 InlineSite getInlineSite() const { return InlineSite(Guid, ProbeId); }
333 Probes = ProbesRef.data();
334 NumProbes = ProbesRef.size();
335 }
336 auto getProbes() const {
338 }
339};
340
341/// Instances of this class represent the pseudo probes inserted into a compile
342/// unit.
344public:
345 void addPseudoProbe(MCSymbol *FuncSym, const MCPseudoProbe &Probe,
346 const MCPseudoProbeInlineStack &InlineStack) {
347 MCProbeDivisions[FuncSym].addPseudoProbe(Probe, InlineStack);
348 }
349
350 // The addresses of MCPseudoProbeInlineTree are used by the tree structure and
351 // need to be stable.
352 using MCProbeDivisionMap = std::unordered_map<MCSymbol *, MCPseudoProbeInlineTree>;
353
354private:
355 // A collection of MCPseudoProbe for each function. The MCPseudoProbes are
356 // grouped by GUIDs due to inlining that can bring probes from different
357 // functions into one function.
358 MCProbeDivisionMap MCProbeDivisions;
359
360public:
361 const MCProbeDivisionMap &getMCProbes() const { return MCProbeDivisions; }
362
363 bool empty() const { return MCProbeDivisions.empty(); }
364
365 LLVM_ABI void emit(MCObjectStreamer *MCOS);
366};
367
369 // A collection of MCPseudoProbe in the current module grouped by
370 // functions. MCPseudoProbes will be encoded into a corresponding
371 // .pseudoprobe section. With functions emitted as separate comdats,
372 // a text section really only contains the code of a function solely, and the
373 // probes associated with the text section will be emitted into a standalone
374 // .pseudoprobe section that shares the same comdat group with the function.
375 MCPseudoProbeSections MCProbeSections;
376
377public:
378 LLVM_ABI static void emit(MCObjectStreamer *MCOS);
379
380 MCPseudoProbeSections &getProbeSections() { return MCProbeSections; }
381
382#ifndef NDEBUG
383 static int DdgPrintIndent;
384#endif
385};
386
388 // Decoded pseudo probes vector.
389 std::vector<MCDecodedPseudoProbe> PseudoProbeVec;
390 // Injected pseudo probes, identified by the containing inline tree node.
391 // Need to keep injected probes separately for two reasons:
392 // 1) Probes cannot be added to the PseudoProbeVec: appending may cause
393 // reallocation so that pointers to its elements will become invalid.
394 // 2) Probes belonging to function record must be contiguous in PseudoProbeVec
395 // as owning InlineTree references them with an ArrayRef to save space.
396 std::unordered_map<const MCDecodedPseudoProbeInlineTree *,
397 std::vector<MCDecodedPseudoProbe>>
398 InjectedProbeMap;
399 // Decoded inline records vector.
400 std::vector<MCDecodedPseudoProbeInlineTree> InlineTreeVec;
401
402 // GUID to PseudoProbeFuncDesc map.
403 GUIDProbeFunctionMap GUID2FuncDescMap;
404
405 BumpPtrAllocator FuncNameAllocator;
406
407 // Address to probes map.
408 AddressProbesMap Address2ProbesMap;
409
410 // The dummy root of the inline trie, all the outlined function will directly
411 // be the children of the dummy root, all the inlined function will be the
412 // children of its inlineer. So the relation would be like:
413 // DummyRoot --> OutlinedFunc --> InlinedFunc1 --> InlinedFunc2
414 MCDecodedPseudoProbeInlineTree DummyInlineRoot;
415
416 /// Points to the current location in the buffer.
417 const uint8_t *Data = nullptr;
418
419 /// Points to the end of the buffer.
420 const uint8_t *End = nullptr;
421
422 /// Whether encoding is based on a starting probe with absolute code address.
423 bool EncodingIsAddrBased = false;
424
425 // Decoding helper function
426 template <typename T> ErrorOr<T> readUnencodedNumber();
427 template <typename T> ErrorOr<T> readUnsignedNumber();
428 template <typename T> ErrorOr<T> readSignedNumber();
429 ErrorOr<StringRef> readString(uint32_t Size);
430
431public:
434
435 // Decode pseudo_probe_desc section to build GUID to PseudoProbeFuncDesc map.
436 // If pseudo_probe_desc section is mapped to memory and \p IsMMapped is true,
437 // uses StringRefs pointing to the section.
438 LLVM_ABI bool buildGUID2FuncDescMap(const uint8_t *Start, std::size_t Size,
439 bool IsMMapped = false);
440
441 // Decode pseudo_probe section to count the number of probes and inlined
442 // function records for each function record.
443 template <bool IsTopLevelFunc>
444 bool countRecords(bool &Discard, uint32_t &ProbeCount, uint32_t &InlinedCount,
445 const Uint64Set &GuidFilter);
446
447 // Decode pseudo_probe section to build address to probes map for specifed
448 // functions only.
449 LLVM_ABI bool buildAddress2ProbeMap(const uint8_t *Start, std::size_t Size,
450 const Uint64Set &GuildFilter,
451 const Uint64Map &FuncStartAddrs);
452
453 // Print pseudo_probe_desc section info
455
456 // Print pseudo_probe section info, used along with show-disassembly
458
459 // do printProbeForAddress for all addresses
461
462 // Look up the probe of a call for the input address
465
467
468 // Helper function to populate one probe's inline stack into
469 // \p InlineContextStack.
470 // Current leaf location info will be added if IncludeLeaf is true
471 // Example:
472 // Current probe(bar:3) inlined at foo:2 then inlined at main:1
473 // IncludeLeaf = true, Output: [main:1, foo:2, bar:3]
474 // IncludeLeaf = false, Output: [main:1, foo:2]
476 const MCDecodedPseudoProbe *Probe,
478 bool IncludeLeaf) const;
479
481 return Address2ProbesMap;
482 }
483
484 AddressProbesMap &getAddress2ProbesMap() { return Address2ProbesMap; }
485
487 return GUID2FuncDescMap;
488 }
489
492
494 return DummyInlineRoot;
495 }
496
499 InjectedProbeMap[Parent].emplace_back(Probe).setAddress(Address);
500 }
501
502 size_t
504 auto It = InjectedProbeMap.find(Parent);
505 if (It == InjectedProbeMap.end())
506 return 0;
507 return It->second.size();
508 }
509
511 auto It = InjectedProbeMap.find(Parent);
512 assert(It != InjectedProbeMap.end());
513 return iterator_range(It->second);
514 }
515
517 return InlineTreeVec;
518 }
519
520private:
521 // Recursively parse an inlining tree encoded in pseudo_probe section. Returns
522 // whether the the top-level node should be skipped.
523 template <bool IsTopLevelFunc>
525 uint64_t &LastAddr, const Uint64Set &GuildFilter,
526 const Uint64Map &FuncStartAddrs,
527 const uint32_t CurChildIndex);
528};
529
530} // end namespace llvm
531
532#endif // LLVM_MC_MCPSEUDOPROBE_H
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file defines the BumpPtrAllocator interface.
BlockVerifier::State From
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
#define LLVM_ABI
Definition: Compiler.h:213
Given that RA is a live value
This file defines the DenseMap class.
This file defines the DenseSet and SmallDenseSet classes.
uint64_t Addr
std::string Name
uint64_t Size
Provides ErrorOr<T> smart pointer.
#define I(x, y, z)
Definition: MD5.cpp:58
raw_pwrite_stream & OS
This file defines the SmallVector class.
auto find(uint64_t Address) const
auto find(uint64_t From, uint64_t To) const
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:41
size_t size() const
size - Get the array size.
Definition: ArrayRef.h:147
Allocate memory in an ever growing pool, as if by bump-pointer.
Definition: Allocator.h:67
Represents either an error or a value T.
Definition: ErrorOr.h:56
auto find(uint64_t GUID) const
MCDecodedPseudoProbeInlineTree(const InlineSite &Site, MCDecodedPseudoProbeInlineTree *Parent)
void setProbes(MutableArrayRef< MCDecodedPseudoProbe > ProbesRef)
LLVM_ABI void print(raw_ostream &OS, const GUIDProbeFunctionMap &GUID2FuncMAP, bool ShowName) const
void setAddress(uint64_t Addr)
LLVM_ABI uint64_t getGuid() const
MCDecodedPseudoProbe(uint64_t Ad, uint32_t I, PseudoProbeType K, uint8_t At, uint32_t D, MCDecodedPseudoProbeInlineTree *Tree)
LLVM_ABI std::string getInlineContextStr(const GUIDProbeFunctionMap &GUID2FuncMAP) const
MCDecodedPseudoProbeInlineTree * getInlineTreeNode() const
LLVM_ABI void getInlineContext(SmallVectorImpl< MCPseudoProbeFrameLocation > &ContextStack, const GUIDProbeFunctionMap &GUID2FuncMAP) const
uint64_t getAddress() const
Streaming object file generation interface.
uint32_t getIndex() const
uint8_t getType() const
uint8_t getAttributes() const
uint32_t getDiscriminator() const
MCPseudoProbeBase(uint64_t I, uint64_t At, uint8_t T, uint32_t D)
bool isIndirectCall() const
void setAttributes(uint8_t Attr)
static const uint32_t PseudoProbeFirstId
auto getInjectedProbes(MCDecodedPseudoProbeInlineTree *Parent)
DenseSet< uint64_t > Uint64Set
LLVM_ABI bool buildAddress2ProbeMap(const uint8_t *Start, std::size_t Size, const Uint64Set &GuildFilter, const Uint64Map &FuncStartAddrs)
const AddressProbesMap & getAddress2ProbesMap() const
LLVM_ABI void printProbesForAllAddresses(raw_ostream &OS)
size_t getNumInjectedProbes(const MCDecodedPseudoProbeInlineTree *Parent) const
const GUIDProbeFunctionMap & getGUID2FuncDescMap() const
const MCDecodedPseudoProbeInlineTree & getDummyInlineRoot() const
LLVM_ABI void printGUID2FuncDescMap(raw_ostream &OS)
DenseMap< uint64_t, uint64_t > Uint64Map
LLVM_ABI bool buildGUID2FuncDescMap(const uint8_t *Start, std::size_t Size, bool IsMMapped=false)
LLVM_ABI void printProbeForAddress(raw_ostream &OS, uint64_t Address)
ArrayRef< MCDecodedPseudoProbeInlineTree > getInlineTreeVec() const
LLVM_ABI void getInlineContextForProbe(const MCDecodedPseudoProbe *Probe, SmallVectorImpl< MCPseudoProbeFrameLocation > &InlineContextStack, bool IncludeLeaf) const
AddressProbesMap & getAddress2ProbesMap()
LLVM_ABI const MCPseudoProbeFuncDesc * getInlinerDescForProbe(const MCDecodedPseudoProbe *Probe) const
bool countRecords(bool &Discard, uint32_t &ProbeCount, uint32_t &InlinedCount, const Uint64Set &GuidFilter)
void addInjectedProbe(const MCDecodedPseudoProbe &Probe, uint64_t Address)
LLVM_ABI const MCDecodedPseudoProbe * getCallProbeForAddr(uint64_t Address) const
LLVM_ABI const MCPseudoProbeFuncDesc * getFuncDescForGUID(uint64_t GUID) const
DerivedProbeInlineTreeType * getOrAddNode(const InlineSite &Site)
MCPseudoProbeInlineTreeBase< ProbesType, DerivedProbeInlineTreeType, InlinedProbeTreeMap > * Parent
const InlinedProbeTreeMap & getChildren() const
InlinedProbeTreeMap & getChildren()
const ProbesType & getProbes() const
LLVM_ABI void emit(MCObjectStreamer *MCOS, const MCPseudoProbe *&LastProbe)
MCPseudoProbeInlineTree(uint64_t Guid)
LLVM_ABI void addPseudoProbe(const MCPseudoProbe &Probe, const MCPseudoProbeInlineStack &InlineStack)
MCPseudoProbeInlineTree(const InlineSite &Site)
Instances of this class represent the pseudo probes inserted into a compile unit.
void addPseudoProbe(MCSymbol *FuncSym, const MCPseudoProbe &Probe, const MCPseudoProbeInlineStack &InlineStack)
LLVM_ABI void emit(MCObjectStreamer *MCOS)
const MCProbeDivisionMap & getMCProbes() const
std::unordered_map< MCSymbol *, MCPseudoProbeInlineTree > MCProbeDivisionMap
MCPseudoProbeSections & getProbeSections()
static LLVM_ABI void emit(MCObjectStreamer *MCOS)
Instances of this class represent a pseudo probe instance for a pseudo probe table entry,...
MCSymbol * getLabel() const
LLVM_ABI void emit(MCObjectStreamer *MCOS, const MCPseudoProbe *LastProbe) const
MCPseudoProbe(MCSymbol *Label, uint64_t Guid, uint64_t Index, uint64_t Type, uint64_t Attributes, uint32_t Discriminator)
uint64_t getGuid() const
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:42
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
Definition: ArrayRef.h:303
T * data() const
Definition: ArrayRef.h:345
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: SmallVector.h:574
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1197
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:55
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
A range adaptor for a pair of iterators.
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
PseudoProbeType
Definition: PseudoProbe.h:30
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
std::tuple< uint64_t, uint32_t > InlineSite
Op::Description Desc
decltype(auto) get(const PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info > &Pair)
std::pair< StringRef, uint32_t > MCPseudoProbeFrameLocation
auto lower_bound(R &&Range, T &&Value)
Provide wrappers to std::lower_bound which take ranges instead of having to pass begin/end explicitly...
Definition: STLExtras.h:2013
MCPseudoProbeFlag
Definition: MCPseudoProbe.h:81
Implement std::hash so that hash_code can be used in STL containers.
Definition: BitVector.h:856
Description of the encoding of one expression Op.
uint64_t operator()(const InlineSite &Site) const
MCPseudoProbeFuncDesc(uint64_t GUID, uint64_t Hash, StringRef Name)
Definition: MCPseudoProbe.h:93
LLVM_ABI void print(raw_ostream &OS)