LLVM 23.0.0git
ProfDataUtils.cpp File Reference

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.

Functions

static bool isTargetMD (const MDNode *ProfData, const char *Name, unsigned MinOps)
template<typename T, typename = typename std::enable_if<std::is_arithmetic_v<T>>>
static void extractFromBranchWeightMD (const MDNode *ProfileData, SmallVectorImpl< T > &Weights)
static bool hasCountTypeMD (const Instruction &I)

Variables

static constexpr unsigned MinBWOps = 3
static constexpr unsigned MinVPOps = 5
static cl::opt< boolElideAllZeroBranchWeights ("elide-all-zero-branch-weights", cl::init(true))

Function Documentation

◆ extractFromBranchWeightMD()

◆ hasCountTypeMD()

bool hasCountTypeMD ( const Instruction & I)
static

Definition at line 141 of file ProfDataUtils.cpp.

References I, llvm::isa(), llvm::isBranchWeightMD(), and llvm::isValueProfileMD().

Referenced by llvm::scaleProfData().

◆ isTargetMD()

bool isTargetMD ( const MDNode * ProfData,
const char * Name,
unsigned MinOps )
static

Variable Documentation

◆ ElideAllZeroBranchWeights

cl::opt< bool > ElideAllZeroBranchWeights("elide-all-zero-branch-weights", cl::init(true)) ( "elide-all-zero-branch-weights" ,
cl::init(true)  )
static

Referenced by llvm::setBranchWeights().

◆ MinBWOps

unsigned MinBWOps = 3
staticconstexpr

Definition at line 47 of file ProfDataUtils.cpp.

Referenced by llvm::isBranchWeightMD().

◆ MinVPOps

unsigned MinVPOps = 5
staticconstexpr

Definition at line 50 of file ProfDataUtils.cpp.

Referenced by llvm::isValueProfileMD().