LLVM 22.0.0git
Debugify.h File Reference

Go to the source code of this file.

Classes

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

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.

Typedefs

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

Enumerations

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

Functions

LLVM_ABI 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.
LLVM_ABI bool llvm::stripDebugifyMetadata (Module &M)
 Strip out all of the metadata and debug info inserted by debugify.
LLVM_ABI bool llvm::collectDebugInfoMetadata (Module &M, iterator_range< Module::iterator > Functions, DebugInfoPerPass &DebugInfoBeforePass, StringRef Banner, StringRef NameOfWrappedPass)
 Collect original debug information before a pass.
LLVM_ABI bool llvm::checkDebugInfoMetadata (Module &M, iterator_range< Module::iterator > Functions, DebugInfoPerPass &DebugInfoBeforePass, StringRef Banner, StringRef NameOfWrappedPass, StringRef OrigDIVerifyBugsReportFilePath)
 Check original debug information after a pass.
LLVM_ABI llvm::ModulePasscreateDebugifyModulePass (enum DebugifyMode Mode=DebugifyMode::SyntheticDebugInfo, llvm::StringRef NameOfWrappedPass="", DebugInfoPerPass *DebugInfoBeforePass=nullptr)
LLVM_ABI llvm::FunctionPasscreateDebugifyFunctionPass (enum DebugifyMode Mode=DebugifyMode::SyntheticDebugInfo, llvm::StringRef NameOfWrappedPass="", DebugInfoPerPass *DebugInfoBeforePass=nullptr)
LLVM_ABI llvm::ModulePasscreateCheckDebugifyModulePass (bool Strip=false, llvm::StringRef NameOfWrappedPass="", DebugifyStatsMap *StatsMap=nullptr, enum DebugifyMode Mode=DebugifyMode::SyntheticDebugInfo, DebugInfoPerPass *DebugInfoBeforePass=nullptr, llvm::StringRef OrigDIVerifyBugsReportFilePath="")
LLVM_ABI llvm::FunctionPasscreateCheckDebugifyFunctionPass (bool Strip=false, llvm::StringRef NameOfWrappedPass="", DebugifyStatsMap *StatsMap=nullptr, enum DebugifyMode Mode=DebugifyMode::SyntheticDebugInfo, DebugInfoPerPass *DebugInfoBeforePass=nullptr, llvm::StringRef OrigDIVerifyBugsReportFilePath="")
LLVM_ABI void llvm::exportDebugifyStats (StringRef Path, const DebugifyStatsMap &Map)

Typedef Documentation

◆ DebugFnMap

using DebugFnMap
Initial value:
This class implements a map that also provides access to all stored values in a deterministic order.
Definition MapVector.h:36

Definition at line 29 of file Debugify.h.

◆ DebugifyStatsMap

Map pass names to a per-pass DebugifyStatistics instance.

Definition at line 152 of file Debugify.h.

◆ DebugInstMap

Definition at line 31 of file Debugify.h.

◆ DebugVarMap

Definition at line 32 of file Debugify.h.

◆ WeakInstValueMap

Enumeration Type Documentation

◆ DebugifyMode

enum class DebugifyMode
strong

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

Enumerator
NoDebugify 
SyntheticDebugInfo 
OriginalDebugInfo 

Definition at line 98 of file Debugify.h.

Function Documentation

◆ createCheckDebugifyFunctionPass()

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

Definition at line 1089 of file Debugify.cpp.

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

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

◆ createCheckDebugifyModulePass()

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

Definition at line 1077 of file Debugify.cpp.

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

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

◆ createDebugifyFunctionPass()

LLVM_ABI llvm::FunctionPass * createDebugifyFunctionPass ( enum DebugifyMode Mode = DebugifyMode::SyntheticDebugInfo,
llvm::StringRef NameOfWrappedPass = "",
DebugInfoPerPass * DebugInfoBeforePass = nullptr )

Definition at line 1054 of file Debugify.cpp.

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

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

◆ createDebugifyModulePass()

LLVM_ABI llvm::ModulePass * createDebugifyModulePass ( enum DebugifyMode Mode = DebugifyMode::SyntheticDebugInfo,
llvm::StringRef NameOfWrappedPass = "",
DebugInfoPerPass * DebugInfoBeforePass = nullptr )

Definition at line 1044 of file Debugify.cpp.

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

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