|
LLVM
4.0.0
|
#include "llvm/Transforms/InstrProfiling.h"#include "llvm/ADT/Triple.h"#include "llvm/Analysis/TargetLibraryInfo.h"#include "llvm/IR/IRBuilder.h"#include "llvm/IR/IntrinsicInst.h"#include "llvm/IR/Module.h"#include "llvm/ProfileData/InstrProf.h"#include "llvm/Transforms/Utils/ModuleUtils.h"#include "llvm/ProfileData/InstrProfData.inc"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "instrprof" |
| #define | VALUE_PROF_FUNC_PARAM(ParamType, ParamName, ParamLLVMType) ParamLLVMType |
| #define | INSTR_PROF_DATA(Type, LLVMType, Name, Init) LLVMType, |
| #define | INSTR_PROF_DATA(Type, LLVMType, Name, Init) Init, |
| #define | INSTR_PROF_MIN_VAL_COUNTS 10 |
| #define | INSTR_PROF_VALUE_NODE(Type, LLVMType, Name, Init) LLVMType, |
Functions | |
| INITIALIZE_PASS_BEGIN (InstrProfilingLegacyPass,"instrprof","Frontend instrumentation-based coverage lowering.", false, false) INITIALIZE_PASS_END(InstrProfilingLegacyPass | |
| static InstrProfIncrementInst * | castToIncrementInst (Instruction *Instr) |
| static Constant * | getOrInsertValueProfilingCall (Module &M, const TargetLibraryInfo &TLI) |
| static std::string | getVarName (InstrProfIncrementInst *Inc, StringRef Prefix) |
| Get the name of a profiling variable for a particular function. More... | |
| static bool | shouldRecordFunctionAddr (Function *F) |
| static Comdat * | getOrCreateProfileComdat (Module &M, Function &F, InstrProfIncrementInst *Inc) |
| static bool | needsRuntimeRegistrationOfSectionRange (const Module &M) |
Variables | |
| instrprof | |
| Frontend instrumentation based coverage | lowering |
| Frontend instrumentation based coverage | false |
| #define DEBUG_TYPE "instrprof" |
Definition at line 27 of file InstrProfiling.cpp.
| #define INSTR_PROF_MIN_VAL_COUNTS 10 |
| #define VALUE_PROF_FUNC_PARAM | ( | ParamType, | |
| ParamName, | |||
| ParamLLVMType | |||
| ) | ParamLLVMType |
|
static |
Definition at line 124 of file InstrProfiling.cpp.
References llvm::dyn_cast().
Referenced by llvm::InstrProfiling::run().
|
inlinestatic |
Definition at line 312 of file InstrProfiling.cpp.
References ComdatPrefix, llvm::getInstrProfComdatPrefix(), llvm::getInstrProfCountersVarPrefix(), llvm::Module::getOrInsertComdat(), llvm::Module::getTargetTriple(), getVarName(), and llvm::needsComdatForCounter().
|
static |
|
static |
Get the name of a profiling variable for a particular function.
Definition at line 277 of file InstrProfiling.cpp.
References llvm::canRenameComdatFunc(), llvm::StringRef::endswith(), F, llvm::InstrProfIncrementInst::getHash(), llvm::getInstrProfNameVarPrefix(), llvm::Value::getName(), llvm::InstrProfIncrementInst::getName(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::ConstantInt::getZExtValue(), llvm::isIRPGOFlagSet(), llvm::StringRef::size(), llvm::StringRef::substr(), and llvm::toStringRef().
Referenced by getOrCreateProfileComdat().
| INITIALIZE_PASS_BEGIN | ( | InstrProfilingLegacyPass | , |
| "instrprof" | , | ||
| "Frontend instrumentation-based coverage lowering." | , | ||
| false | , | ||
| false | |||
| ) |
Definition at line 327 of file InstrProfiling.cpp.
References llvm::Module::getTargetTriple().
Definition at line 292 of file InstrProfiling.cpp.
References llvm::Function::hasAddressTaken(), llvm::GlobalValue::hasAvailableExternallyLinkage(), llvm::GlobalObject::hasComdat(), llvm::GlobalValue::hasLinkOnceLinkage(), and llvm::GlobalValue::hasLocalLinkage().
| Frontend instrumentation based coverage false |
Definition at line 92 of file InstrProfiling.cpp.
| instrprof |
Definition at line 92 of file InstrProfiling.cpp.
| Frontend instrumentation based coverage lowering |
Definition at line 92 of file InstrProfiling.cpp.
1.8.6