36 class AnalysisResolver;
124 const std::string &Banner)
const = 0;
193 template<
typename AnalysisType> AnalysisType *
206 template<
typename AnalysisType>
209 template<
typename AnalysisType>
212 template<
typename AnalysisType>
215 template<
typename AnalysisType>
233 const std::string &Banner)
const override;
237 virtual bool runOnModule(
Module &M) = 0;
247 bool skipModule(
Module &M)
const;
267 virtual void initializePass();
290 const std::string &Banner)
const override;
305 bool skipFunction(
const Function &F)
const;
327 const std::string &Banner)
const override;
355 bool skipBasicBlock(
const BasicBlock &BB)
const;
371 #endif // LLVM_PASS_H Pass interface - Implemented by all 'passes'.
PassManagerType
Different types of internal pass managers.
PassKind getPassKind() const
This class represents lattice values for constants.
virtual PMDataManager * getAsPMDataManager()
virtual void dumpPassStructure(unsigned Offset=0)
A Module instance is used to store all the information related to an LLVM module. ...
virtual void releaseMemory()
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
AnalysisResolver * getResolver() const
virtual void preparePassManager(PMStack &)
Check if available pass managers are suitable for this pass or not.
virtual StringRef getPassName() const
getPassName - Return a nice clean name for a pass.
bool mustPreserveAnalysisID(char &AID) const
mustPreserveAnalysisID - This method serves the same function as getAnalysisIfAvailable, but works if you just have an AnalysisID.
void setResolver(AnalysisResolver *AR)
virtual void verifyAnalysis() const
verifyAnalysis() - This member can be implemented by a analysis pass to check state of analysis infor...
AnalysisResolver - Simple interface used by Pass objects to pull all analysis information out of pass...
virtual PassManagerType getPotentialPassManagerType() const
Return what kind of Pass Manager can manage this pass.
virtual bool doFinalization(Module &)
doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes...
PMStack - This class implements a stack data structure of PMDataManager pointers. ...
virtual void getAnalysisUsage(AnalysisUsage &) const
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
bool runOnModule(Module &) override
ImmutablePasses are never run.
AnalysisType & getAnalysis() const
getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information ...
Pass & operator=(const Pass &)=delete
virtual ImmutablePass * getAsImmutablePass()
static const PassInfo * lookupPassInfo(const void *TI)
virtual bool doInitialization(Module &)
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before ...
AnalysisType & getAnalysisID(AnalysisID PI) const
static bool runOnFunction(Function &F, bool PostInlining)
LLVM Basic Block Representation.
AnalysisID getPassID() const
getPassID - Return the PassID number that corresponds to this pass.
Interface for looking up the initializer for a variable name, used by Init::resolveReferences.
Represent the analysis usage information of a pass.
FunctionPass class - This class is used to implement most global optimizations.
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
PassInfo class - An instance of this class exists for every pass known by the system, and can be obtained from a live Pass by calling its getPassInfo() method.
Deprecated - do not create new passes as BasicBlockPasses.
static bool runOnBasicBlock(MachineBasicBlock *MBB, std::vector< StringRef > &bbNames, unsigned &basicBlockNum, NamedVRegCursor &NVC)
ImmutablePass class - This class is used to provide information that does not need to be run...
Pass(PassKind K, char &pid)
BasicBlockPass(char &pid)
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
virtual void print(raw_ostream &OS, const Module *M) const
print - Print out the internal state of the pass.
PMDataManager provides the common place to manage the analysis data used by pass managers.
static Pass * createPass(AnalysisID ID)
AnalysisType * getAnalysisIfAvailable() const
getAnalysisIfAvailable<AnalysisType>() - Subclasses use this function to get analysis information tha...
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, Function or MachineFunction).
virtual void * getAdjustedAnalysisPointer(AnalysisID ID)
getAdjustedAnalysisPointer - This method is used when a pass implements an analysis interface through...
This class implements an extremely fast bulk output stream that can only output to a stream...
ImmutablePass * getAsImmutablePass() override
StringRef - Represent a constant reference to a string, i.e.
bool TimePassesIsEnabled
If the user specifies the -time-passes argument on an LLVM tool command line then the value of this b...
virtual void assignPassManager(PMStack &, PassManagerType)
Each pass is responsible for assigning a pass manager to itself.