Go to the documentation of this file.
14 #ifndef LLVM_TRANSFORMS_UTILS_DEBUGIFY_H
15 #define LLVM_TRANSFORMS_UTILS_DEBUGIFY_H
58 Module &
M, iterator_range<Module::iterator> Functions, StringRef Banner,
74 iterator_range<Module::iterator> Functions,
76 StringRef Banner, StringRef NameOfWrappedPass);
86 iterator_range<Module::iterator> Functions,
88 StringRef Banner, StringRef NameOfWrappedPass,
89 StringRef OrigDIVerifyBugsReportFilePath);
170 StringRef OrigDIVerifyBugsReportFilePath;
184 if (!WrapWithDebugify) {
202 OrigDIVerifyBugsReportFilePath));
209 OrigDIVerifyBugsReportFilePath));
221 DebugInfoBeforePass = &PerPassDI;
224 OrigDIVerifyBugsReportFilePath = BugsReportFilePath;
227 return OrigDIVerifyBugsReportFilePath;
244 #endif // LLVM_TRANSFORMS_UTILS_DEBUGIFY_H
A set of analyses that are preserved following a run of a transformation pass.
This is an optimization pass for GlobalISel generic memory operations.
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
DebugifyMode
Used to check whether we track synthetic or original debug info.
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
A CRTP mix-in to automatically provide informational APIs needed for passes.
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
PassInstrumentationCallbacks PIC
llvm::PreservedAnalyses run(llvm::Module &M, llvm::ModuleAnalysisManager &AM)
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::FunctionPass * createCheckDebugifyFunctionPass(bool Strip=false, llvm::StringRef NameOfWrappedPass="", DebugifyStatsMap *StatsMap=nullptr, enum DebugifyMode Mode=DebugifyMode::SyntheticDebugInfo, DebugInfoPerPass *DebugInfoBeforePass=nullptr, llvm::StringRef OrigDIVerifyBugsReportFilePath="")
bool collectDebugInfoMetadata(Module &M, iterator_range< Module::iterator > Functions, DebugInfoPerPass &DebugInfoBeforePass, StringRef Banner, StringRef NameOfWrappedPass)
Collect original debug information before a pass.
DebugifyCustomPassManager wraps each pass with the debugify passes if needed.
DebugInfoPerPass & getDebugInfoPerPass()
bool isOriginalDebugInfoMode() const
void exportDebugifyStats(StringRef Path, const DebugifyStatsMap &Map)
WeakInstValueMap InstToDelete
bool stripDebugifyMetadata(Module &M)
Strip out all of the metadata and debug info inserted by debugify.
float getMissingValueRatio() const
Get the ratio of missing/expected dbg.values.
StringRef getOrigDIVerifyBugsReportFilePath() const
Used to track the Debug Info Metadata information.
llvm::ModulePass * createDebugifyModulePass(enum DebugifyMode Mode=DebugifyMode::SyntheticDebugInfo, llvm::StringRef NameOfWrappedPass="", DebugInfoPerPass *DebugInfoBeforePass=nullptr)
DebugifyStatsMap StatsMap
bool isSyntheticDebugInfo() const
void setDebugInfoBeforePass(DebugInfoPerPass &PerPassDI)
bool checkDebugInfoMetadata(Module &M, iterator_range< Module::iterator > Functions, DebugInfoPerPass &DebugInfoBeforePass, StringRef Banner, StringRef NameOfWrappedPass, StringRef OrigDIVerifyBugsReportFilePath)
Check original debug information after a pass.
unsigned NumDbgLocsMissing
Number of instructions with empty debug locations.
llvm::FunctionPass * createDebugifyFunctionPass(enum DebugifyMode Mode=DebugifyMode::SyntheticDebugInfo, llvm::StringRef NameOfWrappedPass="", DebugInfoPerPass *DebugInfoBeforePass=nullptr)
Track how much debugify information (in the synthetic mode only) has been lost.
void setDIStatsMap(DebugifyStatsMap &StatMap)
print Print MemDeps of function
A Module instance is used to store all the information related to an LLVM module.
unsigned NumDbgLocsExpected
Number of instructions expected to have debug locations.
StringRef - Represent a constant reference to a string, i.e.
Machine Check Debug Module
bool isIRPrintingPass(Pass *P)
Return true if a pass is for IR printing.
float getEmptyLocationRatio() const
Get the ratio of missing/expected instructions with locations.
PassManager manages ModulePassManagers.
llvm::PreservedAnalyses run(llvm::Module &M, llvm::ModuleAnalysisManager &AM)
void add(Pass *P) override
Add a pass to the queue of passes to run.
void setOrigDIVerifyBugsReportFilePath(StringRef BugsReportFilePath)
Pass interface - Implemented by all 'passes'.
This class manages callbacks registration, as well as provides a way for PassInstrumentation to pass ...
llvm::ModulePass * createCheckDebugifyModulePass(bool Strip=false, llvm::StringRef NameOfWrappedPass="", DebugifyStatsMap *StatsMap=nullptr, enum DebugifyMode Mode=DebugifyMode::SyntheticDebugInfo, DebugInfoPerPass *DebugInfoBeforePass=nullptr, llvm::StringRef OrigDIVerifyBugsReportFilePath="")
A container for analyses that lazily runs them and caches their results.
unsigned NumDbgValuesExpected
Number of dbg.values expected.
FunctionPass class - This class is used to implement most global optimizations.
unsigned NumDbgValuesMissing
Number of missing dbg.values.
void registerCallbacks(PassInstrumentationCallbacks &PIC)
void setDebugifyMode(enum DebugifyMode M)
void add(Pass *P) override
Add a pass to the queue of passes to run.
const DebugifyStatsMap & getDebugifyStatsMap() const
bool isBitcodeWriterPass(Pass *P)
Check whether a pass is a BitcodeWriterPass.