LLVM 20.0.0git
Functions
ProfileSummary.cpp File Reference
#include "llvm/IR/ProfileSummary.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Type.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Format.h"

Go to the source code of this file.

Functions

static MetadatagetKeyValMD (LLVMContext &Context, const char *Key, uint64_t Val)
 
static MetadatagetKeyFPValMD (LLVMContext &Context, const char *Key, double Val)
 
static MetadatagetKeyValMD (LLVMContext &Context, const char *Key, const char *Val)
 
static ConstantAsMetadatagetValMD (MDTuple *MD, const char *Key)
 
static bool getVal (MDTuple *MD, const char *Key, uint64_t &Val)
 
static bool getVal (MDTuple *MD, const char *Key, double &Val)
 
static bool isKeyValuePair (MDTuple *MD, const char *Key, const char *Val)
 
static bool getSummaryFromMD (MDTuple *MD, SummaryEntryVector &Summary)
 
template<typename ValueType >
static bool getOptionalVal (MDTuple *Tuple, unsigned &Idx, const char *Key, ValueType &Value)
 

Function Documentation

◆ getKeyFPValMD()

static Metadata * getKeyFPValMD ( LLVMContext Context,
const char Key,
double  Val 
)
static

◆ getKeyValMD() [1/2]

static Metadata * getKeyValMD ( LLVMContext Context,
const char Key,
const char Val 
)
static

Definition at line 44 of file ProfileSummary.cpp.

References llvm::MDTuple::get(), and llvm::MDString::get().

◆ getKeyValMD() [2/2]

static Metadata * getKeyValMD ( LLVMContext Context,
const char Key,
uint64_t  Val 
)
static

◆ getOptionalVal()

template<typename ValueType >
static bool getOptionalVal ( MDTuple Tuple,
unsigned Idx,
const char Key,
ValueType Value 
)
static

◆ getSummaryFromMD()

static bool getSummaryFromMD ( MDTuple MD,
SummaryEntryVector Summary 
)
static

◆ getVal() [1/2]

static bool getVal ( MDTuple MD,
const char Key,
double &  Val 
)
static

Definition at line 127 of file ProfileSummary.cpp.

References getValMD().

◆ getVal() [2/2]

static bool getVal ( MDTuple MD,
const char Key,
uint64_t Val 
)
static

Definition at line 119 of file ProfileSummary.cpp.

References getValMD().

Referenced by llvm::ProfileSummary::getFromMD(), and getOptionalVal().

◆ getValMD()

static ConstantAsMetadata * getValMD ( MDTuple MD,
const char Key 
)
static

◆ isKeyValuePair()

static bool isKeyValuePair ( MDTuple MD,
const char Key,
const char Val 
)
static