LLVM
8.0.1
|
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of passes that operate on the MachineFunction representation. More...
#include "llvm/CodeGen/MachineFunctionPass.h"
Public Member Functions | |
bool | doInitialization (Module &) override |
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before any pass is run. More... | |
Public Member Functions inherited from llvm::FunctionPass | |
FunctionPass (char &pid) | |
Pass * | createPrinterPass (raw_ostream &OS, const std::string &Banner) const override |
createPrinterPass - Get a function printer pass. More... | |
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 that manager. More... | |
PassManagerType | getPotentialPassManagerType () const override |
Return what kind of Pass Manager can manage this pass. More... | |
Public Member Functions inherited from llvm::Pass | |
Pass (PassKind K, char &pid) | |
Pass (const Pass &)=delete | |
Pass & | operator= (const Pass &)=delete |
virtual | ~Pass () |
PassKind | getPassKind () const |
virtual StringRef | getPassName () const |
getPassName - Return a nice clean name for a pass. More... | |
AnalysisID | getPassID () const |
getPassID - Return the PassID number that corresponds to this pass. More... | |
virtual bool | doFinalization (Module &) |
doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes have run. More... | |
virtual void | print (raw_ostream &OS, const Module *M) const |
print - Print out the internal state of the pass. More... | |
void | dump () const |
virtual void | preparePassManager (PMStack &) |
Check if available pass managers are suitable for this pass or not. More... | |
void | setResolver (AnalysisResolver *AR) |
AnalysisResolver * | getResolver () const |
virtual void | releaseMemory () |
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memory when it is no longer needed. More... | |
virtual void * | getAdjustedAnalysisPointer (AnalysisID ID) |
getAdjustedAnalysisPointer - This method is used when a pass implements an analysis interface through multiple inheritance. More... | |
virtual ImmutablePass * | getAsImmutablePass () |
virtual PMDataManager * | getAsPMDataManager () |
virtual void | verifyAnalysis () const |
verifyAnalysis() - This member can be implemented by a analysis pass to check state of analysis information. More... | |
virtual void | dumpPassStructure (unsigned Offset=0) |
template<typename AnalysisType > | |
AnalysisType * | getAnalysisIfAvailable () const |
getAnalysisIfAvailable<AnalysisType>() - Subclasses use this function to get analysis information that might be around, for example to update it. More... | |
bool | mustPreserveAnalysisID (char &AID) const |
mustPreserveAnalysisID - This method serves the same function as getAnalysisIfAvailable, but works if you just have an AnalysisID. More... | |
template<typename AnalysisType > | |
AnalysisType & | getAnalysis () const |
getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information that they claim to use by overriding the getAnalysisUsage function. More... | |
template<typename AnalysisType > | |
AnalysisType & | getAnalysis (Function &F) |
getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information that they claim to use by overriding the getAnalysisUsage function. More... | |
template<typename AnalysisType > | |
AnalysisType & | getAnalysisID (AnalysisID PI) const |
template<typename AnalysisType > | |
AnalysisType & | getAnalysisID (AnalysisID PI, Function &F) |
Protected Member Functions | |
MachineFunctionPass (char &ID) | |
virtual bool | runOnMachineFunction (MachineFunction &MF)=0 |
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformation or analysis. More... | |
void | getAnalysisUsage (AnalysisUsage &AU) const override |
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this. More... | |
virtual MachineFunctionProperties | getRequiredProperties () const |
virtual MachineFunctionProperties | getSetProperties () const |
virtual MachineFunctionProperties | getClearedProperties () const |
Protected Member Functions inherited from llvm::FunctionPass | |
bool | skipFunction (const Function &F) const |
Optional passes call this function to check whether the pass should be skipped. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::Pass | |
static const PassInfo * | lookupPassInfo (const void *TI) |
static const PassInfo * | lookupPassInfo (StringRef Arg) |
static Pass * | createPass (AnalysisID ID) |
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of passes that operate on the MachineFunction representation.
Instead of overriding runOnFunction, subclasses override runOnMachineFunction.
Definition at line 31 of file MachineFunctionPass.h.
|
inlineexplicitprotected |
Definition at line 42 of file MachineFunctionPass.h.
References getAnalysisUsage(), and runOnMachineFunction().
Referenced by llvm::VirtRegMap::dump(), and isSecondInstructionInSequence().
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before any pass is run.
Reimplemented from llvm::Pass.
Reimplemented in llvm::NVPTXAsmPrinter, llvm::X86AsmPrinter, and llvm::SystemZAsmPrinter.
Definition at line 33 of file MachineFunctionPass.h.
References getClearedProperties(), getRequiredProperties(), and getSetProperties().
|
overrideprotectedvirtual |
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
For MachineFunctionPasses, calling AU.preservesCFG() indicates that the pass does not modify the MachineBasicBlock CFG.
Reimplemented from llvm::Pass.
Reimplemented in llvm::SlotIndexes, llvm::NVPTXAsmPrinter, llvm::MachineOptimizationRemarkEmitterPass, llvm::WebAssemblyExceptionInfo, llvm::MachineLoopInfo, llvm::MachineTraceMetrics, llvm::MachineRegionInfoPass, llvm::MachinePipeliner, llvm::MachinePostDominatorTree, llvm::ReachingDefAnalysis, llvm::VirtRegMap, llvm::SelectionDAGISel, llvm::BreakFalseDeps, and llvm::MipsDAGToDAGISel.
Definition at line 104 of file MachineFunctionPass.cpp.
References llvm::AnalysisUsage::addPreserved(), llvm::AnalysisUsage::addRequired(), and llvm::Pass::getAnalysisUsage().
Referenced by BlockData::BlockData(), computeBranchTargetAndInversion(), llvm::createAArch64ConditionalCompares(), llvm::createAArch64ConditionOptimizerPass(), createBBSelectReg(), llvm::createFalkorMarkStridedAccessesPass(), llvm::createGreedyRegisterAllocator(), llvm::createPrologEpilogInserterPass(), llvm::createSystemZLDCleanupPass(), llvm::createX86FlagsCopyLoweringPass(), llvm::InstructionSelect::getAnalysisUsage(), llvm::MachineBlockFrequencyInfo::getAnalysisUsage(), llvm::Legalizer::getAnalysisUsage(), llvm::BreakFalseDeps::getAnalysisUsage(), llvm::LazyMachineBlockFrequencyInfoPass::getAnalysisUsage(), llvm::SelectionDAGISel::getAnalysisUsage(), llvm::Localizer::getAnalysisUsage(), llvm::VirtRegMap::getAnalysisUsage(), llvm::ReachingDefAnalysis::getAnalysisUsage(), llvm::MachinePostDominatorTree::getAnalysisUsage(), llvm::MachinePipeliner::getAnalysisUsage(), llvm::LiveStacks::getAnalysisUsage(), llvm::MachineRegionInfoPass::getAnalysisUsage(), llvm::MachineDominanceFrontier::getAnalysisUsage(), llvm::MachineTraceMetrics::getAnalysisUsage(), llvm::ExecutionDomainFix::getAnalysisUsage(), llvm::MachineLoopInfo::getAnalysisUsage(), llvm::WebAssemblyExceptionInfo::getAnalysisUsage(), llvm::MachineOptimizationRemarkEmitterPass::getAnalysisUsage(), llvm::GISelCSEAnalysisWrapperPass::getAnalysisUsage(), llvm::LiveVariables::getAnalysisUsage(), llvm::AsmPrinter::getAnalysisUsage(), llvm::LiveIntervals::getAnalysisUsage(), llvm::SlotIndexes::getAnalysisUsage(), llvm::IRTranslator::getAnalysisUsage(), llvm::RegBankSelect::getAnalysisUsage(), getLayoutSuccessorProbThreshold(), llvm::X86InstrInfo::getSerializableDirectMachineOperandTargetFlags(), INITIALIZE_PASS(), llvm::CoalescerPair::isCoalescable(), isDebug(), isImplicitlyDef(), isSecondInstructionInSequence(), llvm::LiveRegMatrix::LiveRegMatrix(), MachineFunctionPass(), performSink(), llvm::UnreachableBlockElimPass::run(), and llvm::AntiDepBreaker::~AntiDepBreaker().
|
inlineprotectedvirtual |
Definition at line 63 of file MachineFunctionPass.h.
References F(), and llvm::RISCVFenceField::O.
Referenced by doInitialization().
|
inlineprotectedvirtual |
Reimplemented in llvm::RegBankSelect, llvm::ExecutionDomainFix, llvm::ReachingDefAnalysis, llvm::Localizer, llvm::BreakFalseDeps, llvm::Legalizer, and llvm::InstructionSelect.
Definition at line 57 of file MachineFunctionPass.h.
Referenced by doInitialization(), and isSecondInstructionInSequence().
|
inlineprotectedvirtual |
Reimplemented in llvm::RegBankSelect, llvm::Legalizer, and llvm::InstructionSelect.
Definition at line 60 of file MachineFunctionPass.h.
Referenced by doInitialization(), and llvm::VirtRegMap::dump().
|
protectedpure virtual |
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformation or analysis.
Implemented in llvm::RegBankSelect, llvm::IRTranslator, llvm::AVRDynAllocaSR, llvm::AVRFrameAnalyzer, llvm::SlotIndexes, llvm::NVPTXAsmPrinter, llvm::AsmPrinter, llvm::LiveIntervals, llvm::GISelCSEAnalysisWrapperPass, llvm::MachineOptimizationRemarkEmitterPass, llvm::LiveVariables, llvm::ExecutionDomainFix, llvm::X86AsmPrinter, llvm::WebAssemblyExceptionInfo, llvm::MachineLoopInfo, llvm::MipsAsmPrinter, llvm::MachineDominatorTree, llvm::MachineTraceMetrics, llvm::AMDGPUAsmPrinter, llvm::MachineDominanceFrontier, llvm::MachineRegionInfoPass, llvm::LiveStacks, llvm::ARMAsmPrinter, llvm::MachinePipeliner, llvm::ReachingDefAnalysis, llvm::MachinePostDominatorTree, llvm::FixAllFDIVSQRT, llvm::VirtRegMap, llvm::Localizer, llvm::SelectionDAGISel, llvm::LazyMachineBlockFrequencyInfoPass, llvm::DetectRoundChange, llvm::BreakFalseDeps, llvm::Legalizer, llvm::InsertNOPLoad, llvm::WebAssemblyAsmPrinter, llvm::InstructionSelect, llvm::NVPTXDAGToDAGISel, llvm::MachineBlockFrequencyInfo, llvm::MipsDAGToDAGISel, llvm::HexagonDAGToDAGISel, llvm::HexagonAsmPrinter, llvm::AVRDAGToDAGISel, and llvm::R600AsmPrinter.
Referenced by isSecondInstructionInSequence(), and MachineFunctionPass().