13#ifndef LLVM_TRANSFORMS_INSTRUMENTATION_H
14#define LLVM_TRANSFORMS_INSTRUMENTATION_H
30class OptimizationRemarkEmitter;
49 Twine NamePrefix =
"");
110 uint64_t TotalCount,
bool AttachProfToDirectCall,
173 return MaxCount < std::numeric_limits<uint32_t>::max()
175 : MaxCount / std::numeric_limits<uint32_t>::max() + 1;
184 assert(
Scaled <= std::numeric_limits<uint32_t>::max() &&
"overflow 32-bits");
Machine Check Debug Module
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
InstListType::iterator iterator
Instruction iterators...
Base class for all callable instructions (InvokeInst and CallInst) Holds everything related to callin...
void SetCurrentDebugLocation(DebugLoc L)
Set location information used by debugging information.
DebugLoc getCurrentDebugLocation() const
Get location information used by debugging information.
This provides a uniform API for creating instructions and inserting them into a basic block: either a...
const Function * getFunction() const
Return the function this instruction belongs to.
static MDTuple * get(LLVMContext &Context, ArrayRef< Metadata * > MDs)
A Module instance is used to store all the information related to an LLVM module.
CallBase & promoteIndirectCall(CallBase &CB, Function *F, uint64_t Count, uint64_t TotalCount, bool AttachProfToDirectCall, OptimizationRemarkEmitter *ORE)
This is an optimization pass for GlobalISel generic memory operations.
GlobalVariable * createPrivateGlobalForString(Module &M, StringRef Str, bool AllowMerging, Twine NamePrefix="")
void createProfileSamplingVar(Module &M)
Comdat * getOrCreateFunctionComdat(Function &F, Triple &T)
static uint32_t scaleBranchCount(uint64_t Count, uint64_t Scale)
Scale an individual branch count.
void setGlobalVariableLargeSection(const Triple &TargetTriple, GlobalVariable &GV)
static uint64_t calculateCountScale(uint64_t MaxCount)
Calculate what to divide by to scale counts.
BasicBlock::iterator PrepareToSplitEntryBlock(BasicBlock &BB, BasicBlock::iterator IP)
Instrumentation passes often insert conditional checks into entry blocks.
bool checkIfAlreadyInstrumented(Module &M, StringRef Flag)
Check if module has flag attached, if not add the flag.
static GCOVOptions getDefault()
Options for the frontend instrumentation based profiling pass.
InstrProfOptions()=default
std::string InstrProfileOutput
InstrumentationIRBuilder(Instruction *IP)
static void ensureDebugInfo(IRBuilder<> &IRB, const Function &F)
enum llvm::SanitizerCoverageOptions::Type CoverageType
SanitizerCoverageOptions()=default