13#ifndef LLVM_SUPPORT_DISCRIMINATOR_H
14#define LLVM_SUPPORT_DISCRIMINATOR_H
26 return U > 0x1f ? (((U & 0xfe0) << 1) | (U & 0x1f) | 0x20) : U;
34 return (U & 0x20) ? (((U >> 1) & 0xfe0) | (U & 0x1f)) : (U & 0x1f);
40 return D >> ((
D & 0x40) ? 14 : 7);
50 return (
C == 0) ? 1 : (
C > 0x1f ? 14 : 7);
88 unsigned I =
static_cast<unsigned>(
P);
97 unsigned I =
static_cast<unsigned>(
P);
128 assert((
N < 32) &&
"N is invalid");
129 return (1U << (
N + 1)) - 1;
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
static unsigned getPrefixEncodingFromUnsigned(unsigned U)
With a given unsigned int U, use up to 13 bits to represent it.
static unsigned encodingBits(unsigned C)
static unsigned encodeComponent(unsigned C)
static unsigned getNextComponentInDiscriminator(unsigned D)
Returns the next component stored in discriminator.
static unsigned getUnsignedFromPrefixEncoding(unsigned U)
Reverse transformation as getPrefixEncodingFromUnsigned.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This is an optimization pass for GlobalISel generic memory operations.
static int getLastFSPassBitBegin()
static unsigned getFSPassBitBegin(sampleprof::FSDiscriminatorPass P)
static unsigned getNumFSPasses()
static unsigned getBaseFSBitBegin()
static unsigned getFSPassBitEnd(sampleprof::FSDiscriminatorPass P)
static unsigned getBaseFSBitEnd()
static unsigned getN1Bits(int N)
static unsigned getLastFSPassBitEnd()
static const unsigned FSDiscriminatorBitWidth
static const unsigned BaseDiscriminatorBitWidth