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