38 auto Name = InlinedAt->getSubprogramLinkageName();
40 uint64_t &CallerGuid = NameGuidMap[Name];
44 verifyGuidExistenceInDesc(CallerGuid, Name);
47 InlinedAt->getDiscriminator());
48 ReversedInlineStack.
emplace_back(CallerGuid, CallerProbeId);
49 InlinedAt = InlinedAt->getInlinedAt();
56 Discriminator =
DebugLoc->getDiscriminator();
58 "Discriminator should not be set in non-FSAFDO mode");
60 Asm->OutStreamer->emitPseudoProbe(
Guid, Index,
Type, Attr, Discriminator,
61 InlineStack, Asm->CurrentFnSym);
63 verifyGuidExistenceInDesc(
69void PseudoProbeHandler::verifyGuidExistenceInDesc(
uint64_t Guid,
76 for (
size_t I = DescGuidSet.
size(), E =
Desc->getNumOperands();
I != E; ++
I) {
79 DescGuidSet.
insert(
ID->getZExtValue());
84 <<
" does not exist in pseudo probe desc\n";
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
Module.h This file contains the declarations for the Module class.
MachineFunction * MF
The current machine function.
static LLVM_ABI GUID getGUIDAssumingExternalLinkage(StringRef GlobalName)
Return a 64-bit global unique ID constructed from the name of a global symbol.
Module * getParent()
Get the module that this global value is contained inside of...
Function & getFunction()
Return the LLVM function that this machine code represents.
NamedMDNode * getNamedMetadata(StringRef Name) const
Return the first NamedMDNode in the module with the specified name.
void emitPseudoProbe(uint64_t Guid, uint64_t Index, uint64_t Type, uint64_t Attr, const DILocation *DebugLoc)
reference emplace_back(ArgTypes &&... Args)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
The instances of the Type class are immutable: once they are created, they are never changed.
static LLVM_ABI raw_ostream & warning()
Convenience method for printing "warning: " to stderr.
std::pair< iterator, bool > insert(const ValueT &V)
bool contains(const_arg_type_t< ValueT > V) const
Check if the set contains the given element.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
std::enable_if_t< detail::IsValidPointer< X, Y >::value, X * > extract(Y &&MD)
Extract a Value from Metadata.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI cl::opt< bool > EnableFSDiscriminator
auto reverse(ContainerTy &&C)
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
constexpr const char * PseudoProbeDescMetadataName
static uint32_t extractProbeIndex(uint32_t Value)