LLVM
8.0.1
|
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/EHPersonalities.h"
#include "llvm/Analysis/PostDominators.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/Mangler.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Instrumentation.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/ModuleUtils.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "sancov" |
Functions | |
static bool | isFullDominator (const BasicBlock *BB, const DominatorTree *DT) |
static bool | isFullPostDominator (const BasicBlock *BB, const PostDominatorTree *PDT) |
static bool | shouldInstrumentBlock (const Function &F, const BasicBlock *BB, const DominatorTree *DT, const PostDominatorTree *PDT, const SanitizerCoverageOptions &Options) |
INITIALIZE_PASS_BEGIN (SanitizerCoverageModule, "sancov", "SanitizerCoverage: TODO." "ModulePass", false, false) INITIALIZE_PASS_END(SanitizerCoverageModule | |
Variables | |
static const char *const | SanCovTracePCIndirName |
static const char *const | SanCovTracePCName = "__sanitizer_cov_trace_pc" |
static const char *const | SanCovTraceCmp1 = "__sanitizer_cov_trace_cmp1" |
static const char *const | SanCovTraceCmp2 = "__sanitizer_cov_trace_cmp2" |
static const char *const | SanCovTraceCmp4 = "__sanitizer_cov_trace_cmp4" |
static const char *const | SanCovTraceCmp8 = "__sanitizer_cov_trace_cmp8" |
static const char *const | SanCovTraceConstCmp1 |
static const char *const | SanCovTraceConstCmp2 |
static const char *const | SanCovTraceConstCmp4 |
static const char *const | SanCovTraceConstCmp8 |
static const char *const | SanCovTraceDiv4 = "__sanitizer_cov_trace_div4" |
static const char *const | SanCovTraceDiv8 = "__sanitizer_cov_trace_div8" |
static const char *const | SanCovTraceGep = "__sanitizer_cov_trace_gep" |
static const char *const | SanCovTraceSwitchName = "__sanitizer_cov_trace_switch" |
static const char *const | SanCovModuleCtorName = "sancov.module_ctor" |
static const uint64_t | SanCtorAndDtorPriority = 2 |
static const char *const | SanCovTracePCGuardName |
static const char *const | SanCovTracePCGuardInitName |
static const char *const | SanCov8bitCountersInitName |
static const char *const | SanCovPCsInitName = "__sanitizer_cov_pcs_init" |
static const char *const | SanCovGuardsSectionName = "sancov_guards" |
static const char *const | SanCovCountersSectionName = "sancov_cntrs" |
static const char *const | SanCovPCsSectionName = "sancov_pcs" |
static const char *const | SanCovLowestStackName = "__sancov_lowest_stack" |
static cl::opt< int > | ClCoverageLevel ("sanitizer-coverage-level", cl::desc("Sanitizer Coverage. 0: none, 1: entry block, 2: all blocks, " "3: all blocks and critical edges"), cl::Hidden, cl::init(0)) |
static cl::opt< bool > | ClTracePC ("sanitizer-coverage-trace-pc", cl::desc("Experimental pc tracing"), cl::Hidden, cl::init(false)) |
static cl::opt< bool > | ClTracePCGuard ("sanitizer-coverage-trace-pc-guard", cl::desc("pc tracing with a guard"), cl::Hidden, cl::init(false)) |
static cl::opt< bool > | ClCreatePCTable ("sanitizer-coverage-pc-table", cl::desc("create a static PC table"), cl::Hidden, cl::init(false)) |
static cl::opt< bool > | ClInline8bitCounters ("sanitizer-coverage-inline-8bit-counters", cl::desc("increments 8-bit counter for every edge"), cl::Hidden, cl::init(false)) |
static cl::opt< bool > | ClCMPTracing ("sanitizer-coverage-trace-compares", cl::desc("Tracing of CMP and similar instructions"), cl::Hidden, cl::init(false)) |
static cl::opt< bool > | ClDIVTracing ("sanitizer-coverage-trace-divs", cl::desc("Tracing of DIV instructions"), cl::Hidden, cl::init(false)) |
static cl::opt< bool > | ClGEPTracing ("sanitizer-coverage-trace-geps", cl::desc("Tracing of GEP instructions"), cl::Hidden, cl::init(false)) |
static cl::opt< bool > | ClPruneBlocks ("sanitizer-coverage-prune-blocks", cl::desc("Reduce the number of instrumented blocks"), cl::Hidden, cl::init(true)) |
static cl::opt< bool > | ClStackDepth ("sanitizer-coverage-stack-depth", cl::desc("max stack depth tracing"), cl::Hidden, cl::init(false)) |
sancov | |
SanitizerCoverage | __pad0__ |
SanitizerCoverage | false |
#define DEBUG_TYPE "sancov" |
Definition at line 44 of file SanitizerCoverage.cpp.
INITIALIZE_PASS_BEGIN | ( | SanitizerCoverageModule | , |
"sancov" | , | ||
"SanitizerCoverage: TODO." "ModulePass" | , | ||
false | , | ||
false | |||
) |
Referenced by shouldInstrumentBlock().
|
static |
Definition at line 431 of file SanitizerCoverage.cpp.
References llvm::DominatorTree::dominates(), llvm::make_range(), llvm::succ_begin(), and llvm::succ_end().
Referenced by shouldInstrumentBlock().
|
static |
Definition at line 444 of file SanitizerCoverage.cpp.
References llvm::DominatorTreeBase< NodeT, IsPostDom >::dominates(), llvm::make_range(), llvm::pred_begin(), and llvm::pred_end().
Referenced by shouldInstrumentBlock().
|
static |
Definition at line 457 of file SanitizerCoverage.cpp.
References assert(), llvm::GlobalValue::AvailableExternallyLinkage, B, llvm::SmallVectorTemplateCommon< T >::begin(), C, Callee, llvm::classifyEHPersonality(), llvm::SanitizerCoverageOptions::CoverageType, llvm::IRBuilder< T, Inserter >::CreateAdd(), llvm::IRBuilder< T, Inserter >::CreateCall(), llvm::IRBuilder< T, Inserter >::CreateGEP(), llvm::IRBuilder< T, Inserter >::CreateICmpULT(), llvm::IRBuilder< T, Inserter >::CreateIntCast(), llvm::IRBuilder< T, Inserter >::CreateIntToPtr(), llvm::IRBuilder< T, Inserter >::CreateLoad(), llvm::IRBuilder< T, Inserter >::CreatePointerCast(), llvm::IRBuilder< T, Inserter >::CreatePtrToInt(), llvm::IRBuilder< T, Inserter >::CreateStore(), llvm::ArrayRef< T >::empty(), llvm::Function::empty(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::BasicBlock::end(), F(), llvm::StringRef::find(), llvm::Intrinsic::frameaddress, GEP, llvm::DebugLoc::get(), llvm::ConstantInt::get(), llvm::ValueAsMetadata::get(), llvm::ArrayType::get(), llvm::ConstantArray::get(), llvm::BlockAddress::get(), llvm::MDNode::get(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCalledFunction(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCalledValue(), llvm::ConstantExpr::getCast(), llvm::Function::getContext(), llvm::Intrinsic::getDeclaration(), llvm::Function::getEntryBlock(), llvm::BasicBlock::getFirstInsertionPt(), llvm::Type::getIntNTy(), llvm::GlobalValue::getLinkage(), llvm::Value::getName(), llvm::Constant::getNullValue(), llvm::GetOrCreateFunctionComdat(), llvm::GlobalValue::getParent(), llvm::Function::getPersonalityFn(), llvm::Type::getPrimitiveSizeInBits(), llvm::Type::getScalarSizeInBits(), llvm::BasicBlock::getSinglePredecessor(), llvm::Function::getSubprogram(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), llvm::Function::hasPersonalityFn(), I, llvm::SystemZISD::ICMP, llvm::SanitizerCoverageOptions::IndirectCalls, INITIALIZE_PASS_BEGIN(), INITIALIZE_PASS_DEPENDENCY, llvm::SanitizerCoverageOptions::Inline8bitCounters, Int32Ty, llvm::GlobalValue::InternalLinkage, llvm::isAsynchronousEHPersonality(), isFullDominator(), isFullPostDominator(), llvm::Type::isIntegerTy(), llvm::GlobalValue::isInterposable(), llvm::Type::isPointerTy(), llvm::SPII::Load, llvm::LLVMContext::MD_associated, N, llvm::SanitizerCoverageOptions::NoPrune, llvm::SanitizerCoverageOptions::PCTable, llvm::PrepareToSplitEntryBlock(), llvm::GlobalValue::PrivateLinkage, llvm::SmallVectorTemplateBase< T >::push_back(), runOnFunction(), SanCovCountersSectionName, SanCovGuardsSectionName, llvm::SanitizerCoverageOptions::SCK_Edge, llvm::SanitizerCoverageOptions::SCK_Function, llvm::ARMBuildAttrs::Section, llvm::IRBuilderBase::SetCurrentDebugLocation(), SI, llvm::SmallVectorBase::size(), llvm::ArrayRef< T >::size(), llvm::sort(), llvm::SplitAllCriticalEdges(), llvm::SplitBlockAndInsertIfThen(), llvm::SanitizerCoverageOptions::StackDepth, llvm::StringRef::startswith(), llvm::SPII::Store, std::swap(), llvm::SanitizerCoverageOptions::TraceCmp, llvm::SanitizerCoverageOptions::TraceDiv, llvm::SanitizerCoverageOptions::TraceGep, llvm::SanitizerCoverageOptions::TracePC, and llvm::SanitizerCoverageOptions::TracePCGuard.
SanitizerCoverage __pad0__ |
Definition at line 861 of file SanitizerCoverage.cpp.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
SanitizerCoverage false |
Definition at line 861 of file SanitizerCoverage.cpp.
sancov |
Definition at line 861 of file SanitizerCoverage.cpp.
Definition at line 72 of file SanitizerCoverage.cpp.
Definition at line 77 of file SanitizerCoverage.cpp.
Referenced by shouldInstrumentBlock().
Definition at line 76 of file SanitizerCoverage.cpp.
Referenced by shouldInstrumentBlock().
Definition at line 80 of file SanitizerCoverage.cpp.
Definition at line 65 of file SanitizerCoverage.cpp.
Definition at line 74 of file SanitizerCoverage.cpp.
Definition at line 78 of file SanitizerCoverage.cpp.
Definition at line 49 of file SanitizerCoverage.cpp.
Definition at line 50 of file SanitizerCoverage.cpp.
Definition at line 51 of file SanitizerCoverage.cpp.
Definition at line 52 of file SanitizerCoverage.cpp.
Definition at line 53 of file SanitizerCoverage.cpp.
Definition at line 55 of file SanitizerCoverage.cpp.
Definition at line 57 of file SanitizerCoverage.cpp.
Definition at line 59 of file SanitizerCoverage.cpp.
Definition at line 61 of file SanitizerCoverage.cpp.
Definition at line 62 of file SanitizerCoverage.cpp.
Definition at line 63 of file SanitizerCoverage.cpp.
Definition at line 70 of file SanitizerCoverage.cpp.
Definition at line 68 of file SanitizerCoverage.cpp.
Definition at line 46 of file SanitizerCoverage.cpp.
Definition at line 48 of file SanitizerCoverage.cpp.
Definition at line 64 of file SanitizerCoverage.cpp.
|
static |
Definition at line 66 of file SanitizerCoverage.cpp.