14 #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_H
15 #define LLVM_TRANSFORMS_INSTRUMENTATION_H
25 #if defined(__GNUC__) && defined(__linux__) && !defined(ANDROID)
26 inline void *getDFSanArgTLSPtrForJIT() {
28 void *__dfsan_arg_tls;
29 return (
void *)&__dfsan_arg_tls;
32 inline void *getDFSanRetValTLSPtrForJIT() {
34 void *__dfsan_retval_tls;
35 return (
void *)&__dfsan_retval_tls;
90 bool SamplePGO =
false);
112 bool AttachProfToDirectCall);
134 bool Recover =
false,
135 bool UseAfterScope =
false);
137 bool Recover =
false,
138 bool UseGlobalsGC =
true);
142 bool Recover =
false);
149 const std::vector<std::string> &ABIListFiles = std::vector<std::string>(),
150 void *(*getArgTLS)() =
nullptr,
void *(*getRetValTLS)() =
nullptr);
165 const EfficiencySanitizerOptions &Options = EfficiencySanitizerOptions());
193 #if defined(__GNUC__) && defined(__linux__) && !defined(ANDROID)
194 inline ModulePass *createDataFlowSanitizerPassForJIT(
195 const std::vector<std::string> &ABIListFiles = std::vector<std::string>()) {
197 getDFSanRetValTLSPtrForJIT);
220 uint64_t Scaled = Count / Scale;
227 #endif // LLVM_TRANSFORMS_INSTRUMENTATION_H
ModulePass * createPGOInstrumentationGenLegacyPass()
enum llvm::EfficiencySanitizerOptions::Type ToolType
GCNRegPressure max(const GCNRegPressure &P1, const GCNRegPressure &P2)
FunctionPass * createBoundsCheckingPass()
FunctionPass * createPGOMemOPSizeOptLegacyPass()
static GCOVOptions getDefault()
ModulePass * createGCOVProfilerPass(const GCOVOptions &Options=GCOVOptions::getDefault())
ModulePass * createInstrProfilingLegacyPass(const InstrProfOptions &Options=InstrProfOptions())
Insert frontend instrumentation based profiling.
ModulePass * createEfficiencySanitizerPass(const EfficiencySanitizerOptions &Options=EfficiencySanitizerOptions())
__attribute__((weak)) int LLVMFuzzerInitialize(int *argc
SanitizerCoverageOptions()=default
bool isLegalToPromote(Instruction *Inst, Function *F, const char **Reason)
ModulePass * createPGOInstrumentationUseLegacyPass(StringRef Filename=StringRef(""))
FunctionPass * createThreadSanitizerPass()
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.
Instruction * promoteIndirectCall(Instruction *Inst, Function *F, uint64_t Count, uint64_t TotalCount, bool AttachProfToDirectCall)
static uint32_t scaleBranchCount(uint64_t Count, uint64_t Scale)
Scale an individual branch count.
std::string InstrProfileOutput
enum llvm::SanitizerCoverageOptions::Type CoverageType
BasicBlock::iterator PrepareToSplitEntryBlock(BasicBlock &BB, BasicBlock::iterator IP)
Instrumentation passes often insert conditional checks into entry blocks.
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...
InstrProfOptions()=default
ModulePass * createSanitizerCoverageModulePass(const SanitizerCoverageOptions &Options=SanitizerCoverageOptions())
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 * createMemorySanitizerPass(int TrackOrigins=0, bool Recover=false)
FunctionPass * createAddressSanitizerFunctionPass(bool CompileKernel=false, bool Recover=false, bool UseAfterScope=false)
StringRef - Represent a constant reference to a string, i.e.
ModulePass * createAddressSanitizerModulePass(bool CompileKernel=false, bool Recover=false, bool UseGlobalsGC=true)
EfficiencySanitizerOptions()=default
ModulePass * createPGOIndirectCallPromotionLegacyPass(bool InLTO=false, bool SamplePGO=false)