14 #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_H
15 #define LLVM_TRANSFORMS_INSTRUMENTATION_H
21 #if defined(__GNUC__) && defined(__linux__) && !defined(ANDROID)
22 inline void *getDFSanArgTLSPtrForJIT() {
24 void *__dfsan_arg_tls;
25 return (
void *)&__dfsan_arg_tls;
28 inline void *getDFSanRetValTLSPtrForJIT() {
30 void *__dfsan_retval_tls;
31 return (
void *)&__dfsan_retval_tls;
105 bool Recover =
false,
106 bool UseAfterScope =
false);
108 bool Recover =
false);
112 bool Recover =
false);
119 const std::vector<std::string> &ABIListFiles = std::vector<std::string>(),
120 void *(*getArgTLS)() =
nullptr,
void *(*getRetValTLS)() =
nullptr);
134 const EfficiencySanitizerOptions &Options = EfficiencySanitizerOptions());
163 #if defined(__GNUC__) && defined(__linux__) && !defined(ANDROID)
164 inline ModulePass *createDataFlowSanitizerPassForJIT(
165 const std::vector<std::string> &ABIListFiles = std::vector<std::string>()) {
167 getDFSanRetValTLSPtrForJIT);
180 return MaxCount < UINT32_MAX ? 1 : MaxCount / UINT32_MAX + 1;
188 uint64_t Scaled = Count / Scale;
189 assert(Scaled <= UINT32_MAX &&
"overflow 32-bits");
ModulePass * createPGOInstrumentationGenLegacyPass()
enum llvm::EfficiencySanitizerOptions::Type ToolType
FunctionPass * createBoundsCheckingPass()
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
Function Alias Analysis false
ModulePass * createAddressSanitizerModulePass(bool CompileKernel=false, bool Recover=false)
EfficiencySanitizerOptions()
ModulePass * createPGOInstrumentationUseLegacyPass(StringRef Filename=StringRef(""))
ModulePass * createPGOIndirectCallPromotionLegacyPass(bool InLTO=false)
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.
static uint32_t scaleBranchCount(uint64_t Count, uint64_t Scale)
Scale an individual branch count.
std::string InstrProfileOutput
SanitizerCoverageOptions()
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.
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
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.
InstListType::iterator iterator
Instruction iterators...