37 class AnalysisResolver;
125 const std::string &Banner)
const = 0;
194 template<
typename AnalysisType> AnalysisType *
207 template<
typename AnalysisType>
210 template<
typename AnalysisType>
213 template<
typename AnalysisType>
216 template<
typename AnalysisType>
234 const std::string &Banner)
const override;
238 virtual bool runOnModule(
Module &M) = 0;
248 bool skipModule(
Module &M)
const;
268 virtual void initializePass();
291 const std::string &Banner)
const override;
306 bool skipFunction(
const Function &F)
const;
325 const std::string &Banner)
const override;
351 bool skipBasicBlock(
const BasicBlock &BB)
const;
367 #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.
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.
BasicBlockPass class - This class is used to implement most local optimizations.
ImmutablePass class - This class is used to provide information that does not need to be run...
Pass(PassKind K, char &pid)
static bool runOnBasicBlock(MachineBasicBlock *MBB, std::vector< StringRef > &bbNames, std::vector< unsigned > &renamedInOtherBB, unsigned &basicBlockNum, unsigned &VRegGapIndex, NamedVRegCursor &NVC)
BasicBlockPass(char &pid)
amdgpu Simplify well known AMD library false Value Value * Arg
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.