LLVM 20.0.0git
|
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"
Inherits llvm::FunctionPass.
Inherited by GCEmptyBasicBlocks, SILowerI1CopiesLegacy, llvm::ARMBlockPlacement, llvm::AVRFrameAnalyzer, llvm::AsmPrinter, llvm::BasicBlockPathCloning, llvm::BreakFalseDeps, llvm::CFIFixup, llvm::EdgeBundles, llvm::ExecutionDomainFix, llvm::GCNRegPressurePrinter, llvm::GISelCSEAnalysisWrapperPass, llvm::GISelKnownBitsAnalysis, llvm::HexagonMask, llvm::IRTranslator, llvm::InstructionSelect, llvm::LEONMachineFunctionPass, llvm::LazyMachineBlockFrequencyInfoPass, llvm::Legalizer, llvm::LiveDebugVariables, llvm::LiveIntervalsWrapperPass, llvm::LiveRegMatrix, llvm::LiveStacks, llvm::LiveVariablesWrapperPass, llvm::LoadStoreOpt, llvm::Localizer, llvm::MIRAddFSDiscriminators, llvm::MIRProfileLoaderPass, llvm::MachineBlockFrequencyInfoWrapperPass, llvm::MachineCycleInfoWrapperPass, llvm::MachineDominanceFrontier, llvm::MachineDominatorTreeWrapperPass, llvm::MachineLoopInfoWrapperPass, llvm::MachineOptimizationRemarkEmitterPass, llvm::MachinePipeliner, llvm::MachinePostDominatorTreeWrapperPass, llvm::MachineRegionInfoPass, llvm::MachineTraceMetrics, llvm::MachineUniformityAnalysisPass, llvm::RAGreedy, llvm::ReachingDefAnalysis, llvm::RegAllocScoring, llvm::RegBankSelect, llvm::SelectionDAGISelLegacy, llvm::SlotIndexesWrapperPass, llvm::SpillPlacement, llvm::ThunkInserterPass< Inserters >, llvm::VirtRegMap, and llvm::WebAssemblyExceptionInfo.
Public Member Functions | |
bool | doInitialization (Module &) override |
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before any pass is run. | |
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. | |
virtual bool | runOnFunction (Function &F)=0 |
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the 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 that manager. | |
PassManagerType | getPotentialPassManagerType () const override |
Return what kind of Pass Manager can manage this pass. | |
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. | |
AnalysisID | getPassID () const |
getPassID - Return the PassID number that corresponds to this pass. | |
virtual bool | doInitialization (Module &) |
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before any pass is run. | |
virtual bool | doFinalization (Module &) |
doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes have run. | |
virtual void | print (raw_ostream &OS, const Module *M) const |
print - Print out the internal state of the pass. | |
void | dump () const |
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 | assignPassManager (PMStack &, PassManagerType) |
Each pass is responsible for assigning a pass manager to itself. | |
virtual void | preparePassManager (PMStack &) |
Check if available pass managers are suitable for this pass or not. | |
virtual PassManagerType | getPotentialPassManagerType () const |
Return what kind of Pass Manager can manage this pass. | |
void | setResolver (AnalysisResolver *AR) |
AnalysisResolver * | getResolver () const |
virtual void | getAnalysisUsage (AnalysisUsage &) const |
getAnalysisUsage - This function should be overriden by passes that need analysis information to do their job. | |
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. | |
virtual void * | getAdjustedAnalysisPointer (AnalysisID ID) |
getAdjustedAnalysisPointer - This method is used when a pass implements an analysis interface through multiple inheritance. | |
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. | |
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. | |
bool | mustPreserveAnalysisID (char &AID) const |
mustPreserveAnalysisID - This method serves the same function as getAnalysisIfAvailable, but works if you just have an AnalysisID. | |
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. | |
template<typename AnalysisType > | |
AnalysisType & | getAnalysis (Function &F, bool *Changed=nullptr) |
getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information that they claim to use by overriding the getAnalysisUsage function. | |
template<typename AnalysisType > | |
AnalysisType & | getAnalysisID (AnalysisID PI) const |
template<typename AnalysisType > | |
AnalysisType & | getAnalysisID (AnalysisID PI, Function &F, bool *Changed=nullptr) |
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. | |
void | getAnalysisUsage (AnalysisUsage &AU) const override |
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this. | |
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. | |
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 30 of file MachineFunctionPass.h.
|
inlineexplicitprotected |
Definition at line 41 of file MachineFunctionPass.h.
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before any pass is run.
Reimplemented from llvm::Pass.
Reimplemented in llvm::AMDGPUAsmPrinter, llvm::NVPTXAsmPrinter, llvm::SystemZAsmPrinter, and llvm::X86AsmPrinter.
Definition at line 32 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::MachineTraceMetrics, llvm::MachineLoopInfoWrapperPass, llvm::MachineOptimizationRemarkEmitterPass, llvm::MachinePipeliner, llvm::MachinePostDominatorTreeWrapperPass, llvm::MachineRegionInfoPass, llvm::MachineUniformityAnalysisPass, llvm::ReachingDefAnalysis, llvm::SelectionDAGISelLegacy, llvm::SlotIndexesWrapperPass, llvm::VirtRegMap, llvm::BasicBlockPathCloning, llvm::BreakFalseDeps, llvm::RegAllocScoring, llvm::RAGreedy, llvm::AMDGPUAsmPrinter, llvm::AMDGPUDAGToDAGISelLegacy, llvm::AMDGPURegBankSelect, llvm::GCNRegPressurePrinter, SILowerI1CopiesLegacy, llvm::ARMBlockPlacement, llvm::MipsDAGToDAGISelLegacy, llvm::MipsSEDAGToDAGISelLegacy, llvm::NVPTXAsmPrinter, and llvm::WebAssemblyExceptionInfo.
Definition at line 169 of file MachineFunctionPass.cpp.
References llvm::AnalysisUsage::addPreserved(), llvm::AnalysisUsage::addRequired(), and llvm::Pass::getAnalysisUsage().
Referenced by llvm::MachineTraceMetrics::getAnalysisUsage(), llvm::AsmPrinter::getAnalysisUsage(), llvm::CFIFixup::getAnalysisUsage(), llvm::ExecutionDomainFix::getAnalysisUsage(), llvm::GISelCSEAnalysisWrapperPass::getAnalysisUsage(), llvm::GISelKnownBitsAnalysis::getAnalysisUsage(), llvm::InstructionSelect::getAnalysisUsage(), llvm::IRTranslator::getAnalysisUsage(), llvm::Legalizer::getAnalysisUsage(), llvm::LoadStoreOpt::getAnalysisUsage(), llvm::Localizer::getAnalysisUsage(), llvm::RegBankSelect::getAnalysisUsage(), llvm::LazyMachineBlockFrequencyInfoPass::getAnalysisUsage(), llvm::LiveIntervalsWrapperPass::getAnalysisUsage(), llvm::LiveStacks::getAnalysisUsage(), llvm::LiveVariablesWrapperPass::getAnalysisUsage(), llvm::MachineBlockFrequencyInfoWrapperPass::getAnalysisUsage(), llvm::MachineCycleInfoWrapperPass::getAnalysisUsage(), llvm::MachineDominanceFrontier::getAnalysisUsage(), llvm::MachineDominatorTreeWrapperPass::getAnalysisUsage(), llvm::MachineLoopInfoWrapperPass::getAnalysisUsage(), llvm::MachineOptimizationRemarkEmitterPass::getAnalysisUsage(), llvm::MachinePipeliner::getAnalysisUsage(), llvm::MachinePostDominatorTreeWrapperPass::getAnalysisUsage(), llvm::MachineRegionInfoPass::getAnalysisUsage(), llvm::MachineUniformityAnalysisPass::getAnalysisUsage(), llvm::ReachingDefAnalysis::getAnalysisUsage(), llvm::SelectionDAGISelLegacy::getAnalysisUsage(), llvm::SlotIndexesWrapperPass::getAnalysisUsage(), llvm::VirtRegMap::getAnalysisUsage(), llvm::BreakFalseDeps::getAnalysisUsage(), llvm::RegAllocScoring::getAnalysisUsage(), llvm::RAGreedy::getAnalysisUsage(), llvm::GCNRegPressurePrinter::getAnalysisUsage(), SILowerI1CopiesLegacy::getAnalysisUsage(), llvm::ARMBlockPlacement::getAnalysisUsage(), llvm::WebAssemblyExceptionInfo::getAnalysisUsage(), INITIALIZE_PASS(), and INITIALIZE_PASS_BEGIN().
|
inlineprotectedvirtual |
Reimplemented in llvm::Legalizer, llvm::RegBankSelect, and llvm::RAGreedy.
Definition at line 62 of file MachineFunctionPass.h.
Referenced by doInitialization().
|
inlineprotectedvirtual |
Reimplemented in llvm::ExecutionDomainFix, llvm::InstructionSelect, llvm::Legalizer, llvm::LoadStoreOpt, llvm::Localizer, llvm::RegBankSelect, llvm::ReachingDefAnalysis, llvm::BreakFalseDeps, and llvm::RAGreedy.
Definition at line 56 of file MachineFunctionPass.h.
Referenced by doInitialization().
|
inlineprotectedvirtual |
Reimplemented in llvm::InstructionSelect, llvm::Legalizer, and llvm::RegBankSelect.
Definition at line 59 of file MachineFunctionPass.h.
Referenced by doInitialization().
|
protectedpure virtual |
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformation or analysis.
Implemented in llvm::LiveIntervalsWrapperPass, llvm::LiveStacks, llvm::MachineTraceMetrics, llvm::RegAllocScoring, llvm::WebAssemblyExceptionInfo, llvm::LazyMachineBlockFrequencyInfoPass, llvm::MachineBlockFrequencyInfoWrapperPass, llvm::MachineCycleInfoWrapperPass, llvm::MachineDominanceFrontier, llvm::MachineLoopInfoWrapperPass, llvm::MachineRegionInfoPass, llvm::MachineUniformityAnalysisPass, llvm::ARMAsmPrinter, llvm::NVPTXAsmPrinter, llvm::SlotIndexesWrapperPass, llvm::HexagonAsmPrinter, llvm::AsmPrinter, llvm::CFIFixup, llvm::ExecutionDomainFix, llvm::GISelCSEAnalysisWrapperPass, llvm::GISelKnownBitsAnalysis, llvm::InstructionSelect, llvm::IRTranslator, llvm::Legalizer, llvm::LoadStoreOpt, llvm::Localizer, llvm::RegBankSelect, llvm::ThunkInserterPass< Inserters >, llvm::LiveVariablesWrapperPass, llvm::MachineDominatorTreeWrapperPass, llvm::MachineOptimizationRemarkEmitterPass, llvm::MachinePipeliner, llvm::MachinePostDominatorTreeWrapperPass, llvm::ReachingDefAnalysis, llvm::SelectionDAGISelLegacy, llvm::VirtRegMap, llvm::BasicBlockPathCloning, llvm::BreakFalseDeps, GCEmptyBasicBlocks, llvm::RAGreedy, llvm::AMDGPUAsmPrinter, llvm::AMDGPUDAGToDAGISelLegacy, llvm::AMDGPURegBankSelect, llvm::GCNRegPressurePrinter, llvm::R600AsmPrinter, SILowerI1CopiesLegacy, llvm::ARMBlockPlacement, llvm::AVRFrameAnalyzer, llvm::CSKYAsmPrinter, llvm::HexagonMask, llvm::LoongArchAsmPrinter, llvm::M68kAsmPrinter, llvm::MipsAsmPrinter, llvm::InsertNOPLoad, llvm::DetectRoundChange, llvm::FixAllFDIVSQRT, llvm::WebAssemblyAsmPrinter, and llvm::X86AsmPrinter.