13 #ifndef LLVM_TRANSFORM_UTILS_DEBUGIFY_H 14 #define LLVM_TRANSFORM_UTILS_DEBUGIFY_H 35 Module &M, iterator_range<Module::iterator> Functions, StringRef Banner,
107 bool EnableDebugifyEach =
false;
115 bool WrapWithDebugify = EnableDebugifyEach && !
P->getAsImmutablePass() &&
117 if (!WrapWithDebugify) {
151 #endif // LLVM_TRANSFORM_UTILS_DEBUGIFY_H Pass interface - Implemented by all 'passes'.
This class represents lattice values for constants.
A Module instance is used to store all the information related to an LLVM module.
This file provides a bitcode writing pass.
unsigned NumDbgValuesMissing
Number of missing dbg.values.
DebugifyCustomPassManager wraps each pass with the debugify passes if needed.
bool stripDebugifyMetadata(Module &M)
Strip out all of the metadata and debug info inserted by debugify.
const DebugifyStatsMap & getDebugifyStatsMap() const
bool isBitcodeWriterPass(Pass *P)
Check whether a pass is a BitcodeWriterPass.
DebugifyStatsMap StatsMap
bool isIRPrintingPass(Pass *P)
Return true if a pass is for IR printing.
void enableDebugifyEach()
A CRTP mix-in to automatically provide informational APIs needed for passes.
Track how much debugify information has been lost.
llvm::PreservedAnalyses run(llvm::Module &M, llvm::ModuleAnalysisManager &AM)
PassManager manages ModulePassManagers.
A set of analyses that are preserved following a run of a transformation pass.
bool applyDebugifyMetadata(Module &M, iterator_range< Module::iterator > Functions, StringRef Banner, std::function< bool(DIBuilder &, Function &)> ApplyToMF)
Add synthesized debug information to a module.
llvm::ModulePass * createCheckDebugifyModulePass(bool Strip=false, llvm::StringRef NameOfWrappedPass="", DebugifyStatsMap *StatsMap=nullptr)
void registerCallbacks(PassInstrumentationCallbacks &PIC)
FunctionPass class - This class is used to implement most global optimizations.
llvm::ModulePass * createDebugifyModulePass()
void add(Pass *P) override
Add a pass to the queue of passes to run.
Machine Check Debug Module
void exportDebugifyStats(StringRef Path, const DebugifyStatsMap &Map)
float getEmptyLocationRatio() const
Get the ratio of missing/expected instructions with locations.
float getMissingValueRatio() const
Get the ratio of missing/expected dbg.values.
unsigned NumDbgLocsExpected
Number of instructions expected to have debug locations.
void add(Pass *P) override
Add a pass to the queue of passes to run.
llvm::PreservedAnalyses run(llvm::Module &M, llvm::ModuleAnalysisManager &AM)
unsigned NumDbgValuesExpected
Number of dbg.values expected.
llvm::FunctionPass * createDebugifyFunctionPass()
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
This file defines passes to print out IR in various granularities.
This class manages callbacks registration, as well as provides a way for PassInstrumentation to pass ...
print Print MemDeps of function
StringRef - Represent a constant reference to a string, i.e.
A container for analyses that lazily runs them and caches their results.
This header defines various interfaces for pass management in LLVM.
unsigned NumDbgLocsMissing
Number of instructions with empty debug locations.
llvm::FunctionPass * createCheckDebugifyFunctionPass(bool Strip=false, llvm::StringRef NameOfWrappedPass="", DebugifyStatsMap *StatsMap=nullptr)