14 #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_H 15 #define LLVM_TRANSFORMS_INSTRUMENTATION_H 30 class OptimizationRemarkEmitter;
44 const char *NamePrefix =
"");
50 const std::string &ModuleId);
96 bool SamplePGO =
false);
121 bool AttachProfToDirectCall,
131 bool DoCounterPromotion =
false;
148 bool Recover =
false,
149 bool UseAfterScope =
false);
151 bool Recover =
false,
152 bool UseGlobalsGC =
true,
153 bool UseOdrIndicator =
true);
156 bool Recover =
false);
160 const std::vector<std::string> &ABIListFiles = std::vector<std::string>(),
161 void *(*getArgTLS)() =
nullptr,
void *(*getRetValTLS)() =
nullptr);
169 } ToolType = ESAN_None;
185 } CoverageType = SCK_None;
186 bool IndirectCalls =
false;
187 bool TraceBB =
false;
188 bool TraceCmp =
false;
189 bool TraceDiv =
false;
190 bool TraceGep =
false;
191 bool Use8bitCounters =
false;
192 bool TracePC =
false;
193 bool TracePCGuard =
false;
194 bool Inline8bitCounters =
false;
195 bool PCTable =
false;
196 bool NoPrune =
false;
197 bool StackDepth =
false;
221 uint64_t Scaled = Count / Scale;
227 #endif // LLVM_TRANSFORMS_INSTRUMENTATION_H
ModulePass * createPGOInstrumentationGenLegacyPass()
GCNRegPressure max(const GCNRegPressure &P1, const GCNRegPressure &P2)
This class represents lattice values for constants.
ModulePass * createGCOVProfilerPass(const GCOVOptions &Options=GCOVOptions::getDefault())
FunctionPass * createPGOMemOPSizeOptLegacyPass()
static GCOVOptions getDefault()
ModulePass * createInstrProfilingLegacyPass(const InstrProfOptions &Options=InstrProfOptions())
Insert frontend instrumentation based profiling.
ModulePass * createEfficiencySanitizerPass(const EfficiencySanitizerOptions &Options=EfficiencySanitizerOptions())
ModulePass * createAddressSanitizerModulePass(bool CompileKernel=false, bool Recover=false, bool UseGlobalsGC=true, bool UseOdrIndicator=true)
Instruction * promoteIndirectCall(Instruction *Inst, Function *F, uint64_t Count, uint64_t TotalCount, bool AttachProfToDirectCall, OptimizationRemarkEmitter *ORE)
ModulePass * createPGOInstrumentationUseLegacyPass(StringRef Filename=StringRef(""))
FunctionPass class - This class is used to implement most global optimizations.
static uint64_t calculateCountScale(uint64_t MaxCount)
Calculate what to divide by to scale counts.
static uint32_t scaleBranchCount(uint64_t Count, uint64_t Scale)
Scale an individual branch count.
std::string InstrProfileOutput
GlobalVariable * createPrivateGlobalForString(Module &M, StringRef Str, bool AllowMerging, const char *NamePrefix="")
BasicBlock::iterator PrepareToSplitEntryBlock(BasicBlock &BB, BasicBlock::iterator IP)
Instrumentation passes often insert conditional checks into entry blocks.
Comdat * GetOrCreateFunctionComdat(Function &F, Triple &T, const std::string &ModuleId)
Options for the frontend instrumentation based profiling pass.
InstListType::iterator iterator
Instruction iterators...
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
ModulePass * createSanitizerCoverageModulePass(const SanitizerCoverageOptions &Options=SanitizerCoverageOptions())
FunctionPass * createHWAddressSanitizerPass(bool CompileKernel=false, bool Recover=false)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ModulePass * createDataFlowSanitizerPass(const std::vector< std::string > &ABIListFiles=std::vector< std::string >(), void *(*getArgTLS)()=nullptr, void *(*getRetValTLS)()=nullptr)
FunctionPass * createAddressSanitizerFunctionPass(bool CompileKernel=false, bool Recover=false, bool UseAfterScope=false)
StringRef - Represent a constant reference to a string, i.e.
ModulePass * createPGOIndirectCallPromotionLegacyPass(bool InLTO=false, bool SamplePGO=false)