13#ifndef LLVM_IR_PSEUDOPROBE_H
14#define LLVM_IR_PSEUDOPROBE_H
38 std::numeric_limits<uint64_t>::max();
52 assert(
Index <= 0xFFFF &&
"Probe index too big to encode, exceeding 2^16");
53 assert(
Type <= 0x7 &&
"Probe type too big to encode, exceeding 7");
56 "Probe distribution factor too big to encode, exceeding 100");
57 return (
Index << 3) | (Factor << 19) | (
Type << 26) | 0x7;
61 return (
Value >> 3) & 0xFFFF;
65 return (
Value >> 26) & 0x7;
69 return (
Value >> 29) & 0x7;
73 return (
Value >> 19) & 0x7F;
94std::optional<PseudoProbe>
extractProbe(
const Instruction &Inst);
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
This is an optimization pass for GlobalISel generic memory operations.
static bool isSentinelProbe(uint32_t Flags)
static constexpr uint64_t PseudoProbeFullDistributionFactor
void setProbeDistributionFactor(Instruction &Inst, float Factor)
std::optional< PseudoProbe > extractProbe(const Instruction &Inst)
@ Invalid
Denotes invalid value.
constexpr const char * PseudoProbeDescMetadataName
static uint32_t extractProbeFactor(uint32_t Value)
static constexpr uint8_t FullDistributionFactor
static uint32_t packProbeData(uint32_t Index, uint32_t Type, uint32_t Flags, uint32_t Factor)
static uint32_t extractProbeIndex(uint32_t Value)
static uint32_t extractProbeAttributes(uint32_t Value)
static uint32_t extractProbeType(uint32_t Value)