|
LLVM 22.0.0git
|
#include "llvm/ADT/Hashing.h"#include "llvm/ADT/MapVector.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/Sequence.h"#include "llvm/ADT/StringMap.h"#include "llvm/Analysis/BlockFrequencyInfo.h"#include "llvm/Analysis/BranchProbabilityInfo.h"#include "llvm/Analysis/TargetLibraryInfo.h"#include "llvm/IR/DebugInfo.h"#include "llvm/IR/DebugLoc.h"#include "llvm/IR/EHPersonalities.h"#include "llvm/IR/IRBuilder.h"#include "llvm/IR/InstIterator.h"#include "llvm/IR/Instructions.h"#include "llvm/IR/Module.h"#include "llvm/ProfileData/InstrProf.h"#include "llvm/Support/CRC.h"#include "llvm/Support/CommandLine.h"#include "llvm/Support/Debug.h"#include "llvm/Support/FileSystem.h"#include "llvm/Support/Path.h"#include "llvm/Support/Regex.h"#include "llvm/Support/VirtualFileSystem.h"#include "llvm/Support/raw_ostream.h"#include "llvm/Transforms/Instrumentation/CFGMST.h"#include "llvm/Transforms/Instrumentation/GCOVProfiler.h"#include "llvm/Transforms/Utils/Instrumentation.h"#include "llvm/Transforms/Utils/ModuleUtils.h"#include <algorithm>#include <memory>#include <string>#include <utility>#include "llvm/ProfileData/InstrProfData.inc"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "insert-gcov-profiling" |
| #define | COVINIT_FUNC(Type, LLVMType, Name, Init) |
| #define | INSTR_PROF_VISIBILITY |
| #define | INSTR_PROF_DATA(Type, LLVMType, Name, Initializer) |
| #define | INSTR_PROF_VTABLE_DATA(Type, LLVMType, Name, Initializer) |
| #define | INSTR_PROF_VALUE_NODE(Type, LLVMType, Name, Initializer) |
| #define | INSTR_PROF_RAW_HEADER(Type, Name, Initializer) |
| #define | VALUE_PROF_FUNC_PARAM(ArgType, ArgName, ArgLLVMType) |
| #define | INSTR_PROF_COMMA |
| #define | VALUE_PROF_KIND(Enumerator, Value, Descr) |
| #define | COVMAP_FUNC_RECORD(Type, LLVMType, Name, Initializer) |
| #define | COVMAP_HEADER(Type, LLVMType, Name, Initializer) |
| #define | INSTR_PROF_DATA_DEFINED |
| #define | COVINIT_FUNC(Type, LLVMType, Name, Init) |
| #define | INSTR_PROF_DATA(Type, LLVMType, Name, Initializer) |
| #define | INSTR_PROF_VTABLE_DATA(Type, LLVMType, Name, Initializer) |
| #define | INSTR_PROF_VALUE_NODE(Type, LLVMType, Name, Initializer) |
| #define | INSTR_PROF_RAW_HEADER(Type, Name, Initializer) |
| #define | VALUE_PROF_FUNC_PARAM(ArgType, ArgName, ArgLLVMType) |
| #define | INSTR_PROF_COMMA |
| #define | VALUE_PROF_KIND(Enumerator, Value, Descr) |
| #define | COVMAP_FUNC_RECORD(Type, LLVMType, Name, Initializer) |
| #define | COVMAP_HEADER(Type, LLVMType, Name, Initializer) |
| #define | INSTR_PROF_DATA_DEFINED |
Enumerations | |
| enum | : uint32_t { GCOV_ARC_ON_TREE = 1 << 0 , GCOV_TAG_FUNCTION = 0x01000000 , GCOV_TAG_BLOCKS = 0x01410000 , GCOV_TAG_ARCS = 0x01430000 , GCOV_TAG_LINES = 0x01450000 } |
Functions | |
| static unsigned | wordsOfString (StringRef s) |
| static StringRef | getFunctionName (const DISubprogram *SP) |
| static SmallString< 128 > | getFilename (const DIScope *SP, vfs::FileSystem &VFS) |
| Extract a filename for a DIScope. | |
| static bool | functionHasLines (const Function &F, unsigned &EndLine) |
| static bool | isUsingScopeBasedEH (Function &F) |
| static BasicBlock * | getInstrBB (CFGMST< Edge, BBInfo > &MST, Edge &E, const DenseSet< const BasicBlock * > &ExecBlocks) |
| static void | dumpEdges (CFGMST< Edge, BBInfo > &MST, GCOVFunction &GF) |
Variables | |
| static cl::opt< std::string > | DefaultGCOVVersion ("default-gcov-version", cl::init("0000"), cl::Hidden, cl::ValueRequired) |
| static cl::opt< bool > | AtomicCounter ("gcov-atomic-counter", cl::Hidden, cl::desc("Make counter updates atomic")) |
| #define COVINIT_FUNC | ( | Type, | |
| LLVMType, | |||
| Name, | |||
| Init ) |
| #define COVINIT_FUNC | ( | Type, | |
| LLVMType, | |||
| Name, | |||
| Init ) |
| #define COVMAP_FUNC_RECORD | ( | Type, | |
| LLVMType, | |||
| Name, | |||
| Initializer ) |
| #define COVMAP_FUNC_RECORD | ( | Type, | |
| LLVMType, | |||
| Name, | |||
| Initializer ) |
| #define COVMAP_HEADER | ( | Type, | |
| LLVMType, | |||
| Name, | |||
| Initializer ) |
| #define COVMAP_HEADER | ( | Type, | |
| LLVMType, | |||
| Name, | |||
| Initializer ) |
| #define DEBUG_TYPE "insert-gcov-profiling" |
Definition at line 52 of file GCOVProfiling.cpp.
| #define INSTR_PROF_COMMA |
| #define INSTR_PROF_COMMA |
| #define INSTR_PROF_DATA | ( | Type, | |
| LLVMType, | |||
| Name, | |||
| Initializer ) |
| #define INSTR_PROF_DATA | ( | Type, | |
| LLVMType, | |||
| Name, | |||
| Initializer ) |
| #define INSTR_PROF_DATA_DEFINED |
| #define INSTR_PROF_DATA_DEFINED |
| #define INSTR_PROF_RAW_HEADER | ( | Type, | |
| Name, | |||
| Initializer ) |
| #define INSTR_PROF_RAW_HEADER | ( | Type, | |
| Name, | |||
| Initializer ) |
| #define INSTR_PROF_VALUE_NODE | ( | Type, | |
| LLVMType, | |||
| Name, | |||
| Initializer ) |
| #define INSTR_PROF_VALUE_NODE | ( | Type, | |
| LLVMType, | |||
| Name, | |||
| Initializer ) |
| #define INSTR_PROF_VISIBILITY |
| #define INSTR_PROF_VTABLE_DATA | ( | Type, | |
| LLVMType, | |||
| Name, | |||
| Initializer ) |
| #define INSTR_PROF_VTABLE_DATA | ( | Type, | |
| LLVMType, | |||
| Name, | |||
| Initializer ) |
| #define VALUE_PROF_FUNC_PARAM | ( | ArgType, | |
| ArgName, | |||
| ArgLLVMType ) |
| #define VALUE_PROF_FUNC_PARAM | ( | ArgType, | |
| ArgName, | |||
| ArgLLVMType ) |
| #define VALUE_PROF_KIND | ( | Enumerator, | |
| Value, | |||
| Descr ) |
| #define VALUE_PROF_KIND | ( | Enumerator, | |
| Value, | |||
| Descr ) |
| anonymous enum : uint32_t |
| Enumerator | |
|---|---|
| GCOV_ARC_ON_TREE | |
| GCOV_TAG_FUNCTION | |
| GCOV_TAG_BLOCKS | |
| GCOV_TAG_ARCS | |
| GCOV_TAG_LINES | |
Definition at line 54 of file GCOVProfiling.cpp.
|
static |
Definition at line 735 of file GCOVProfiling.cpp.
References llvm::CFGMST< Edge, BBInfo >::allEdges(), llvm::dbgs(), E(), and llvm::make_pointee_range().
Definition at line 583 of file GCOVProfiling.cpp.
|
static |
Extract a filename for a DIScope.
Prefer relative paths in the coverage notes. Clang also may split up absolute paths into a directory and filename component. When the relative path doesn't exist, reconstruct the absolute path.
Definition at line 222 of file GCOVProfiling.cpp.
References llvm::sys::path::append(), and llvm::vfs::FileSystem::exists().
Referenced by llvm::checkDebugInfoMetadata(), and llvm::logicalview::LVReader::createScopes().
|
static |
Definition at line 211 of file GCOVProfiling.cpp.
|
static |
Definition at line 690 of file GCOVProfiling.cpp.
References llvm::CFGMST< Edge, BBInfo >::addEdge(), llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::count(), E(), llvm::BasicBlock::end(), llvm::BasicBlock::getFirstInsertionPt(), llvm::Instruction::getNumSuccessors(), llvm::GetSuccessorNumber(), llvm::BasicBlock::getTerminator(), llvm::isa(), and llvm::SplitCriticalEdge().
Definition at line 603 of file GCOVProfiling.cpp.
References llvm::classifyEHPersonality(), F, and llvm::isScopedEHPersonality().
Definition at line 71 of file GCOVProfiling.cpp.
References llvm::StringRef::size().
|
static |
Referenced by llvm::GCOVOptions::getDefault().
|
static |
Referenced by llvm::GCOVOptions::getDefault().