LLVM  5.0.0
Macros | Functions | Variables
SampleProfile.cpp File Reference
#include "llvm/Transforms/SampleProfile.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/PostDominators.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/ValueSymbolTable.h"
#include "llvm/Pass.h"
#include "llvm/ProfileData/InstrProf.h"
#include "llvm/ProfileData/SampleProfReader.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/Instrumentation.h"
#include "llvm/Transforms/Utils/Cloning.h"
#include <cctype>
Include dependency graph for SampleProfile.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "sample-profile"
 

Functions

static uint64_t SortCallTargets (SmallVector< InstrProfValueData, 2 > &Sorted, const SampleRecord::CallTargetMap &M)
 Sorts the CallTargetMap M by count in descending order and stores the sorted result in Sorted. More...
 
 INITIALIZE_PASS_BEGIN (SampleProfileLoaderLegacyPass,"sample-profile","Sample Profile loader", false, false) INITIALIZE_PASS_END(SampleProfileLoaderLegacyPass
 

Variables

static cl::opt< std::string > SampleProfileFile ("sample-profile-file", cl::init(""), cl::value_desc("filename"), cl::desc("Profile file loaded by -sample-profile"), cl::Hidden)
 
static cl::opt< unsigned > SampleProfileMaxPropagateIterations ("sample-profile-max-propagate-iterations", cl::init(100), cl::desc("Maximum number of iterations to go through when propagating ""sample block/edge weights through the CFG."))
 
static cl::opt< unsigned > SampleProfileRecordCoverage ("sample-profile-check-record-coverage", cl::init(0), cl::value_desc("N"), cl::desc("Emit a warning if less than N% of records in the input profile ""are matched to the IR."))
 
static cl::opt< unsigned > SampleProfileSampleCoverage ("sample-profile-check-sample-coverage", cl::init(0), cl::value_desc("N"), cl::desc("Emit a warning if less than N% of samples in the input profile ""are matched to the IR."))
 
static cl::opt< double > SampleProfileHotThreshold ("sample-profile-inline-hot-threshold", cl::init(0.1), cl::value_desc("N"), cl::desc("Inlined functions that account for more than N% of all samples ""collected in the parent function, will be inlined again."))
 
sample profile
 
sample Sample Profile loader
 
sample Sample Profile false
 

Macro Definition Documentation

#define DEBUG_TYPE   "sample-profile"

Definition at line 63 of file SampleProfile.cpp.

Function Documentation

INITIALIZE_PASS_BEGIN ( SampleProfileLoaderLegacyPass  ,
"sample-profile"  ,
"Sample Profile loader"  ,
false  ,
false   
)
static uint64_t SortCallTargets ( SmallVector< InstrProfValueData, 2 > &  Sorted,
const SampleRecord::CallTargetMap &  M 
)
static

Variable Documentation

sample Sample Profile false

Definition at line 1410 of file SampleProfile.cpp.

sample Sample Profile loader

Definition at line 1410 of file SampleProfile.cpp.

sample profile

Definition at line 1410 of file SampleProfile.cpp.

cl::opt<std::string> SampleProfileFile("sample-profile-file", cl::init(""), cl::value_desc("filename"), cl::desc("Profile file loaded by -sample-profile"), cl::Hidden)
static
cl::opt<double> SampleProfileHotThreshold("sample-profile-inline-hot-threshold", cl::init(0.1), cl::value_desc("N"), cl::desc("Inlined functions that account for more than N% of all samples ""collected in the parent function, will be inlined again."))
static
cl::opt<unsigned> SampleProfileMaxPropagateIterations("sample-profile-max-propagate-iterations", cl::init(100), cl::desc("Maximum number of iterations to go through when propagating ""sample block/edge weights through the CFG."))
static
cl::opt<unsigned> SampleProfileRecordCoverage("sample-profile-check-record-coverage", cl::init(0), cl::value_desc("N"), cl::desc("Emit a warning if less than N% of records in the input profile ""are matched to the IR."))
static
cl::opt<unsigned> SampleProfileSampleCoverage("sample-profile-check-sample-coverage", cl::init(0), cl::value_desc("N"), cl::desc("Emit a warning if less than N% of samples in the input profile ""are matched to the IR."))
static