LLVM  14.0.0git
Functions
ProfileSummary.cpp File Reference
#include "llvm/IR/ProfileSummary.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Type.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Format.h"
Include dependency graph for ProfileSummary.cpp:

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 45 of file ProfileSummary.cpp.

References Context, llvm::MDString::get(), and llvm::MDTuple::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 128 of file ProfileSummary.cpp.

References getValMD().

◆ getVal() [2/2]

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

Definition at line 120 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