31#ifdef EXPENSIVE_CHECKS
38class AnalysisResolver;
138 const std::string &Banner)
const = 0;
207 template<
typename AnalysisType> AnalysisType *
220 template<
typename AnalysisType>
223 template <
typename AnalysisType>
226 bool *Changed =
nullptr);
228 template<
typename AnalysisType>
231 template <
typename AnalysisType>
233 bool *Changed =
nullptr);
235#ifdef EXPENSIVE_CHECKS
260 const std::string &Banner)
const override;
316 const std::string &Banner)
const override;
Machine Check Debug Module
AnalysisResolver - Simple interface used by Pass objects to pull all analysis information out of pass...
Represent the analysis usage information of a pass.
FunctionPass class - This class is used to implement most global optimizations.
PassManagerType getPotentialPassManagerType() const override
Return what kind of Pass Manager can manage this pass.
void assignPassManager(PMStack &PMS, PassManagerType T) override
Find appropriate Function Pass Manager or Call Graph Pass Manager in the PM Stack and add self into t...
Pass * createPrinterPass(raw_ostream &OS, const std::string &Banner) const override
createPrinterPass - Get a function printer pass.
virtual bool runOnFunction(Function &F)=0
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass.
bool skipFunction(const Function &F) const
Optional passes call this function to check whether the pass should be skipped.
ImmutablePass class - This class is used to provide information that does not need to be run.
~ImmutablePass() override
ImmutablePass * getAsImmutablePass() override
virtual void initializePass()
initializePass - This method may be overriden by immutable passes to allow them to perform various in...
bool runOnModule(Module &) override
ImmutablePasses are never run.
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
PassManagerType getPotentialPassManagerType() const override
Return what kind of Pass Manager can manage this pass.
bool skipModule(Module &M) const
Optional passes call this function to check whether the pass should be skipped.
void assignPassManager(PMStack &PMS, PassManagerType T) override
Find appropriate Module Pass Manager in the PM Stack and add self into that manager.
virtual bool runOnModule(Module &M)=0
runOnModule - Virtual method overriden by subclasses to process the module being operated on.
Pass * createPrinterPass(raw_ostream &OS, const std::string &Banner) const override
createPrinterPass - Get a module printer pass.
A Module instance is used to store all the information related to an LLVM module.
PMDataManager provides the common place to manage the analysis data used by pass managers.
PMStack - This class implements a stack data structure of PMDataManager pointers.
PassInfo class - An instance of this class exists for every pass known by the system,...
Pass interface - Implemented by all 'passes'.
virtual void * getAdjustedAnalysisPointer(AnalysisID ID)
getAdjustedAnalysisPointer - This method is used when a pass implements an analysis interface through...
virtual PassManagerType getPotentialPassManagerType() const
Return what kind of Pass Manager can manage this pass.
virtual void print(raw_ostream &OS, const Module *M) const
print - Print out the internal state of the pass.
bool mustPreserveAnalysisID(char &AID) const
mustPreserveAnalysisID - This method serves the same function as getAnalysisIfAvailable,...
Pass(PassKind K, char &pid)
void setResolver(AnalysisResolver *AR)
static Pass * createPass(AnalysisID ID)
AnalysisType & getAnalysis() const
getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information ...
virtual PMDataManager * getAsPMDataManager()
AnalysisID getPassID() const
getPassID - Return the PassID number that corresponds to this pass.
virtual void getAnalysisUsage(AnalysisUsage &) const
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
AnalysisType & getAnalysisID(AnalysisID PI) const
virtual void assignPassManager(PMStack &, PassManagerType)
Each pass is responsible for assigning a pass manager to itself.
AnalysisResolver * getResolver() const
PassKind getPassKind() const
virtual void preparePassManager(PMStack &)
Check if available pass managers are suitable for this pass or not.
static const PassInfo * lookupPassInfo(const void *TI)
virtual bool doInitialization(Module &)
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before ...
virtual Pass * createPrinterPass(raw_ostream &OS, const std::string &Banner) const =0
createPrinterPass - Get a Pass appropriate to print the IR this pass operates on (Module,...
virtual bool doFinalization(Module &)
doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes...
virtual void verifyAnalysis() const
verifyAnalysis() - This member can be implemented by a analysis pass to check state of analysis infor...
virtual void dumpPassStructure(unsigned Offset=0)
Pass(const Pass &)=delete
virtual StringRef getPassName() const
getPassName - Return a nice clean name for a pass.
virtual ImmutablePass * getAsImmutablePass()
virtual void releaseMemory()
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
Pass & operator=(const Pass &)=delete
AnalysisType * getAnalysisIfAvailable() const
getAnalysisIfAvailable<AnalysisType>() - Subclasses use this function to get analysis information tha...
Interface for looking up the initializer for a variable name, used by Init::resolveReferences.
StringRef - Represent a constant reference to a string, i.e.
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
PassManagerType
Different types of internal pass managers.
@ PMT_LoopPassManager
LPPassManager.
@ PMT_RegionPassManager
RGPassManager.
@ PMT_CallGraphPassManager
CGPassManager.
@ PMT_ModulePassManager
MPPassManager.
@ PMT_FunctionPassManager
FPPassManager.
bool TimePassesIsEnabled
If the user specifies the -time-passes argument on an LLVM tool command line then the value of this b...
bool TimePassesPerRun
If TimePassesPerRun is true, there would be one line of report for each pass invocation.
ThinOrFullLTOPhase
This enumerates the LLVM full LTO or ThinLTO optimization phases.
@ FullLTOPreLink
Full LTO prelink phase.
@ ThinLTOPostLink
ThinLTO postlink (backend compile) phase.
@ FullLTOPostLink
Full LTO postlink (backend compile) phase.
@ ThinLTOPreLink
ThinLTO prelink (summary) phase.