LLVM 20.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/IntrinsicInst.h"
#include "llvm/IR/Module.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/raw_ostream.h"
#include "llvm/Transforms/Instrumentation.h"
#include "llvm/Transforms/Instrumentation/CFGMST.h"
#include "llvm/Transforms/Instrumentation/GCOVProfiler.h"
#include "llvm/Transforms/Utils/ModuleUtils.h"
#include <algorithm>
#include <memory>
#include <string>
#include <utility>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "insert-gcov-profiling" |
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 DISubprogram *SP) |
Extract a filename for a DISubprogram. | |
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("408*"), cl::Hidden, cl::ValueRequired) |
static cl::opt< bool > | AtomicCounter ("gcov-atomic-counter", cl::Hidden, cl::desc("Make counter updates atomic")) |
#define DEBUG_TYPE "insert-gcov-profiling" |
Definition at line 51 of file GCOVProfiling.cpp.
anonymous enum : uint32_t |
Enumerator | |
---|---|
GCOV_ARC_ON_TREE | |
GCOV_TAG_FUNCTION | |
GCOV_TAG_BLOCKS | |
GCOV_TAG_ARCS | |
GCOV_TAG_LINES |
Definition at line 53 of file GCOVProfiling.cpp.
|
static |
Definition at line 751 of file GCOVProfiling.cpp.
References llvm::CFGMST< Edge, BBInfo >::allEdges(), llvm::dbgs(), and llvm::make_pointee_range().
Definition at line 595 of file GCOVProfiling.cpp.
References F, llvm::DebugLoc::getLine(), and I.
|
static |
Extract a filename for a DISubprogram.
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 213 of file GCOVProfiling.cpp.
References llvm::sys::path::append(), llvm::sys::fs::exists(), llvm::DIScope::getDirectory(), and llvm::DIScope::getFilename().
Referenced by llvm::checkDebugInfoMetadata().
|
static |
Definition at line 202 of file GCOVProfiling.cpp.
References llvm::DIScope::getName().
|
static |
Definition at line 706 of file GCOVProfiling.cpp.
References llvm::CFGMST< Edge, BBInfo >::addEdge(), llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::count(), llvm::BasicBlock::end(), llvm::BasicBlock::getFirstInsertionPt(), llvm::Instruction::getNumSuccessors(), llvm::GetSuccessorNumber(), llvm::BasicBlock::getTerminator(), and llvm::SplitCriticalEdge().
Definition at line 619 of file GCOVProfiling.cpp.
References llvm::classifyEHPersonality(), F, and llvm::isScopedEHPersonality().
Definition at line 70 of file GCOVProfiling.cpp.
References llvm::StringRef::size().
|
static |
Referenced by llvm::GCOVOptions::getDefault().
|
static |
Referenced by llvm::GCOVOptions::getDefault().