LLVM  14.0.0git
Classes | Namespaces | Typedefs | Enumerations | Functions
Debugify.h File Reference
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Bitcode/BitcodeWriterPass.h"
#include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/PassManager.h"
#include "llvm/IR/ValueHandle.h"
Include dependency graph for Debugify.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  DebugInfoPerPass
 Used to track the Debug Info Metadata information. More...
 
struct  NewPMDebugifyPass
 
struct  DebugifyStatistics
 Track how much debugify information (in the synthetic mode only) has been lost. More...
 
struct  NewPMCheckDebugifyPass
 
struct  llvm::DebugifyEachInstrumentation
 
class  llvm::DebugifyCustomPassManager
 DebugifyCustomPassManager wraps each pass with the debugify passes if needed. More...
 

Namespaces

 llvm
 ---------------------— PointerInfo ------------------------------------—
 

Typedefs

using DebugFnMap = llvm::MapVector< llvm::StringRef, const llvm::DISubprogram * >
 
using DebugInstMap = llvm::MapVector< const llvm::Instruction *, bool >
 
using DebugVarMap = llvm::MapVector< const llvm::DILocalVariable *, unsigned >
 
using WeakInstValueMap = llvm::MapVector< const llvm::Instruction *, llvm::WeakVH >
 
using DebugInfoPerPassMap = llvm::MapVector< llvm::StringRef, DebugInfoPerPass >
 Map pass names to a per-pass DebugInfoPerPass instance. More...
 
using DebugifyStatsMap = llvm::MapVector< llvm::StringRef, DebugifyStatistics >
 Map pass names to a per-pass DebugifyStatistics instance. More...
 

Enumerations

enum  DebugifyMode { DebugifyMode::NoDebugify, DebugifyMode::SyntheticDebugInfo, DebugifyMode::OriginalDebugInfo }
 Used to check whether we track synthetic or original debug info. More...
 

Functions

bool llvm::applyDebugifyMetadata (Module &M, iterator_range< Module::iterator > Functions, StringRef Banner, std::function< bool(DIBuilder &, Function &)> ApplyToMF)
 Add synthesized debug information to a module. More...
 
bool llvm::stripDebugifyMetadata (Module &M)
 Strip out all of the metadata and debug info inserted by debugify. More...
 
bool llvm::collectDebugInfoMetadata (Module &M, iterator_range< Module::iterator > Functions, DebugInfoPerPassMap &DIPreservationMap, StringRef Banner, StringRef NameOfWrappedPass)
 Collect original debug information before a pass. More...
 
bool llvm::checkDebugInfoMetadata (Module &M, iterator_range< Module::iterator > Functions, DebugInfoPerPassMap &DIPreservationMap, StringRef Banner, StringRef NameOfWrappedPass, StringRef OrigDIVerifyBugsReportFilePath)
 Check original debug information after a pass. More...
 
llvm::ModulePasscreateDebugifyModulePass (enum DebugifyMode Mode=DebugifyMode::SyntheticDebugInfo, llvm::StringRef NameOfWrappedPass="", DebugInfoPerPassMap *DIPreservationMap=nullptr)
 
llvm::FunctionPasscreateDebugifyFunctionPass (enum DebugifyMode Mode=DebugifyMode::SyntheticDebugInfo, llvm::StringRef NameOfWrappedPass="", DebugInfoPerPassMap *DIPreservationMap=nullptr)
 
llvm::ModulePasscreateCheckDebugifyModulePass (bool Strip=false, llvm::StringRef NameOfWrappedPass="", DebugifyStatsMap *StatsMap=nullptr, enum DebugifyMode Mode=DebugifyMode::SyntheticDebugInfo, DebugInfoPerPassMap *DIPreservationMap=nullptr, llvm::StringRef OrigDIVerifyBugsReportFilePath="")
 
llvm::FunctionPasscreateCheckDebugifyFunctionPass (bool Strip=false, llvm::StringRef NameOfWrappedPass="", DebugifyStatsMap *StatsMap=nullptr, enum DebugifyMode Mode=DebugifyMode::SyntheticDebugInfo, DebugInfoPerPassMap *DIPreservationMap=nullptr, llvm::StringRef OrigDIVerifyBugsReportFilePath="")
 
void llvm::exportDebugifyStats (StringRef Path, const DebugifyStatsMap &Map)
 

Typedef Documentation

◆ DebugFnMap

Definition at line 25 of file Debugify.h.

◆ DebugifyStatsMap

Map pass names to a per-pass DebugifyStatistics instance.

Definition at line 136 of file Debugify.h.

◆ DebugInfoPerPassMap

Map pass names to a per-pass DebugInfoPerPass instance.

Definition at line 45 of file Debugify.h.

◆ DebugInstMap

Definition at line 26 of file Debugify.h.

◆ DebugVarMap

Definition at line 27 of file Debugify.h.

◆ WeakInstValueMap

Definition at line 29 of file Debugify.h.

Enumeration Type Documentation

◆ DebugifyMode

enum DebugifyMode
strong

Used to check whether we track synthetic or original debug info.

Enumerator
NoDebugify 
SyntheticDebugInfo 
OriginalDebugInfo 

Definition at line 94 of file Debugify.h.

Function Documentation

◆ createCheckDebugifyFunctionPass()

llvm::FunctionPass* createCheckDebugifyFunctionPass ( bool  Strip = false,
llvm::StringRef  NameOfWrappedPass = "",
DebugifyStatsMap StatsMap = nullptr,
enum DebugifyMode  Mode = DebugifyMode::SyntheticDebugInfo,
DebugInfoPerPassMap DIPreservationMap = nullptr,
llvm::StringRef  OrigDIVerifyBugsReportFilePath = "" 
)

◆ createCheckDebugifyModulePass()

llvm::ModulePass* createCheckDebugifyModulePass ( bool  Strip = false,
llvm::StringRef  NameOfWrappedPass = "",
DebugifyStatsMap StatsMap = nullptr,
enum DebugifyMode  Mode = DebugifyMode::SyntheticDebugInfo,
DebugInfoPerPassMap DIPreservationMap = nullptr,
llvm::StringRef  OrigDIVerifyBugsReportFilePath = "" 
)

◆ createDebugifyFunctionPass()

llvm::FunctionPass* createDebugifyFunctionPass ( enum DebugifyMode  Mode = DebugifyMode::SyntheticDebugInfo,
llvm::StringRef  NameOfWrappedPass = "",
DebugInfoPerPassMap DIPreservationMap = nullptr 
)

Definition at line 934 of file Debugify.cpp.

References assert(), Mode, OriginalDebugInfo, and SyntheticDebugInfo.

Referenced by llvm::DebugifyCustomPassManager::add().

◆ createDebugifyModulePass()

llvm::ModulePass* createDebugifyModulePass ( enum DebugifyMode  Mode = DebugifyMode::SyntheticDebugInfo,
llvm::StringRef  NameOfWrappedPass = "",
DebugInfoPerPassMap DIPreservationMap = nullptr 
)

Definition at line 924 of file Debugify.cpp.

References assert(), Mode, OriginalDebugInfo, and SyntheticDebugInfo.

Referenced by llvm::DebugifyCustomPassManager::add().