LLVM: llvm::MachineFunctionPass Class Reference (original) (raw)

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](MachineFunctionPass%5F8h%5Fsource.html)"

Inherits llvm::FunctionPass.

Inherited by GCEmptyBasicBlocks, RemoveLoadsIntoFakeUsesLegacy, SILowerI1CopiesLegacy, StaticDataSplitter, llvm::AMDGPUResourceUsageAnalysisWrapperPass, llvm::ARMBlockPlacement, llvm::AVRFrameAnalyzer, llvm::AsmPrinter, llvm::BasicBlockMatchingAndInference, llvm::CFIFixup, llvm::EdgeBundlesWrapperLegacy, llvm::ErrataWorkaround, llvm::ExecutionDomainFix, llvm::GCNRegPressurePrinter, llvm::GISelCSEAnalysisWrapperPass, llvm::GISelValueTrackingAnalysisLegacy, llvm::IRTranslator, llvm::InstructionSelect, llvm::LEONMachineFunctionPass, llvm::LazyMachineBlockFrequencyInfoPass, llvm::Legalizer, llvm::LiveDebugVariablesWrapperLegacy, llvm::LiveIntervalsWrapperPass, llvm::LiveRegMatrixWrapperLegacy, llvm::LiveStacksWrapperLegacy, llvm::LiveVariablesWrapperPass, llvm::LoadStoreOpt, llvm::Localizer, llvm::MIR2VecPrinterLegacyPass, llvm::MIR2VecVocabPrinterLegacyPass, llvm::MIRAddFSDiscriminators, llvm::MIRProfileLoaderPass, llvm::MachineBlockFrequencyInfoWrapperPass, llvm::MachineBlockHashInfo, llvm::MachineCycleInfoWrapperPass, llvm::MachineDominanceFrontier, llvm::MachineDominatorTreeWrapperPass, llvm::MachineLoopInfoWrapperPass, llvm::MachineOptimizationRemarkEmitterPass, llvm::MachinePipeliner, llvm::MachinePostDominatorTreeWrapperPass, llvm::MachineRegionInfoPass, llvm::MachineTraceMetricsWrapperPass, llvm::MachineUniformityAnalysisPass, llvm::RABasic, llvm::ReachingDefInfoWrapperPass, llvm::RegBankSelect, llvm::SelectionDAGISelLegacy, llvm::SlotIndexesWrapperPass, llvm::SpillPlacementWrapperLegacy, llvm::ThunkInserterPass< Inserters >, llvm::VirtRegMapWrapperLegacy, 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)
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.
StringRef getPassArgument () const
Return a nice clean name for a pass corresponding to that used to enable the pass in opt.
AnalysisID getPassID () const
getPassID - Return the PassID number that corresponds to this pass.
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 void preparePassManager (PMStack &)
Check if available pass managers are suitable for this pass or not.
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.
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
AnalysisType * getAnalysisIfAvailable () const
getAnalysisIfAvailable() - 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
AnalysisType & getAnalysis () const
getAnalysis() - This function is used by subclasses to get to the analysis information that they claim to use by overriding the getAnalysisUsage function.
template
AnalysisType & getAnalysis (Function &F, bool *Changed=nullptr)
getAnalysis() - This function is used by subclasses to get to the analysis information that they claim to use by overriding the getAnalysisUsage function.
template
AnalysisType & getAnalysisID (AnalysisID PI) const
template
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.

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.

llvm::MachineFunctionPass::MachineFunctionPass ( char & ID) inlineexplicitprotected

Definition at line 42 of file MachineFunctionPass.h.

References llvm::FunctionPass::FunctionPass().

Referenced by llvm::AMDGPUResourceUsageAnalysisWrapperPass::AMDGPUResourceUsageAnalysisWrapperPass(), llvm::ARMBlockPlacement::ARMBlockPlacement(), llvm::AsmPrinter::AsmPrinter(), llvm::AVRFrameAnalyzer::AVRFrameAnalyzer(), llvm::BasicBlockMatchingAndInference::BasicBlockMatchingAndInference(), llvm::CFIFixup::CFIFixup(), llvm::EdgeBundlesWrapperLegacy::EdgeBundlesWrapperLegacy(), llvm::ErrataWorkaround::ErrataWorkaround(), llvm::ExecutionDomainFix::ExecutionDomainFix(), GCEmptyBasicBlocks::GCEmptyBasicBlocks(), llvm::GCNRegPressurePrinter::GCNRegPressurePrinter(), llvm::GISelCSEAnalysisWrapperPass::GISelCSEAnalysisWrapperPass(), llvm::GISelValueTrackingAnalysisLegacy::GISelValueTrackingAnalysisLegacy(), llvm::InstructionSelect::InstructionSelect(), llvm::IRTranslator::IRTranslator(), llvm::LazyMachineBlockFrequencyInfoPass::LazyMachineBlockFrequencyInfoPass(), llvm::Legalizer::Legalizer(), llvm::LEONMachineFunctionPass::LEONMachineFunctionPass(), llvm::LiveDebugVariablesWrapperLegacy::LiveDebugVariablesWrapperLegacy(), llvm::LiveIntervalsWrapperPass::LiveIntervalsWrapperPass(), llvm::LiveRegMatrixWrapperLegacy::LiveRegMatrixWrapperLegacy(), llvm::LiveStacksWrapperLegacy::LiveStacksWrapperLegacy(), llvm::LiveVariablesWrapperPass::LiveVariablesWrapperPass(), llvm::LoadStoreOpt::LoadStoreOpt(), llvm::Localizer::Localizer(), llvm::MachineBlockFrequencyInfoWrapperPass::MachineBlockFrequencyInfoWrapperPass(), llvm::MachineCycleInfoWrapperPass::MachineCycleInfoWrapperPass(), llvm::MachineDominanceFrontier::MachineDominanceFrontier(), llvm::MachineLoopInfoWrapperPass::MachineLoopInfoWrapperPass(), llvm::MachineOptimizationRemarkEmitterPass::MachineOptimizationRemarkEmitterPass(), llvm::MachinePipeliner::MachinePipeliner(), llvm::MachineRegionInfoPass::MachineRegionInfoPass(), llvm::MachineTraceMetricsWrapperPass::MachineTraceMetricsWrapperPass(), llvm::MachineUniformityAnalysisPass::MachineUniformityAnalysisPass(), llvm::MIR2VecPrinterLegacyPass::MIR2VecPrinterLegacyPass(), llvm::MIR2VecVocabPrinterLegacyPass::MIR2VecVocabPrinterLegacyPass(), llvm::MIRAddFSDiscriminators::MIRAddFSDiscriminators(), llvm::MIRProfileLoaderPass::MIRProfileLoaderPass(), llvm::RABasic::RABasic(), RemoveLoadsIntoFakeUsesLegacy::RemoveLoadsIntoFakeUsesLegacy(), llvm::SelectionDAGISelLegacy::SelectionDAGISelLegacy(), SILowerI1CopiesLegacy::SILowerI1CopiesLegacy(), llvm::SlotIndexesWrapperPass::SlotIndexesWrapperPass(), llvm::SpillPlacementWrapperLegacy::SpillPlacementWrapperLegacy(), StaticDataSplitter::StaticDataSplitter(), llvm::ThunkInserterPass< Inserters >::ThunkInserterPass(), llvm::VirtRegMapWrapperLegacy::VirtRegMapWrapperLegacy(), and llvm::WebAssemblyExceptionInfo::WebAssemblyExceptionInfo().

doInitialization()

bool llvm::MachineFunctionPass::doInitialization ( Module & ) inlineoverridevirtual

getAnalysisUsage()

void MachineFunctionPass::getAnalysisUsage ( AnalysisUsage & AU) const 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::MachineLoopInfoWrapperPass, llvm::MachineOptimizationRemarkEmitterPass, llvm::MachinePipeliner, llvm::MachinePostDominatorTreeWrapperPass, llvm::MachineRegionInfoPass, llvm::MachineTraceMetricsWrapperPass, llvm::MachineUniformityAnalysisPass, llvm::MipsDAGToDAGISelLegacy, llvm::MipsSEDAGToDAGISelLegacy, llvm::MIR2VecPrinterLegacyPass, llvm::MIR2VecVocabPrinterLegacyPass, llvm::NVPTXAsmPrinter, llvm::RABasic, llvm::ReachingDefInfoWrapperPass, llvm::RegBankSelect, llvm::SelectionDAGISelLegacy, llvm::SlotIndexesWrapperPass, llvm::VirtRegMapWrapperLegacy, llvm::WebAssemblyExceptionInfo, RemoveLoadsIntoFakeUsesLegacy, SILowerI1CopiesLegacy, and StaticDataSplitter.

Definition at line 184 of file MachineFunctionPass.cpp.

References llvm::AnalysisUsage::addPreserved(), llvm::AnalysisUsage::addRequired(), and llvm::Pass::getAnalysisUsage().

Referenced by llvm::AMDGPUResourceUsageAnalysisWrapperPass::getAnalysisUsage(), llvm::ARMBlockPlacement::getAnalysisUsage(), llvm::AsmPrinter::getAnalysisUsage(), llvm::BasicBlockMatchingAndInference::getAnalysisUsage(), llvm::CFIFixup::getAnalysisUsage(), llvm::ExecutionDomainFix::getAnalysisUsage(), llvm::GCNRegPressurePrinter::getAnalysisUsage(), llvm::GISelCSEAnalysisWrapperPass::getAnalysisUsage(), llvm::GISelValueTrackingAnalysisLegacy::getAnalysisUsage(), llvm::InstructionSelect::getAnalysisUsage(), llvm::IRTranslator::getAnalysisUsage(), llvm::LazyMachineBlockFrequencyInfoPass::getAnalysisUsage(), llvm::Legalizer::getAnalysisUsage(), llvm::LiveDebugVariablesWrapperLegacy::getAnalysisUsage(), llvm::LiveIntervalsWrapperPass::getAnalysisUsage(), llvm::LiveRegMatrixWrapperLegacy::getAnalysisUsage(), llvm::LiveStacksWrapperLegacy::getAnalysisUsage(), llvm::LiveVariablesWrapperPass::getAnalysisUsage(), llvm::LoadStoreOpt::getAnalysisUsage(), llvm::Localizer::getAnalysisUsage(), llvm::MachineBlockFrequencyInfoWrapperPass::getAnalysisUsage(), llvm::MachineBlockHashInfo::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::MachineTraceMetricsWrapperPass::getAnalysisUsage(), llvm::MachineUniformityAnalysisPass::getAnalysisUsage(), llvm::MIR2VecPrinterLegacyPass::getAnalysisUsage(), llvm::MIR2VecVocabPrinterLegacyPass::getAnalysisUsage(), llvm::RABasic::getAnalysisUsage(), llvm::ReachingDefInfoWrapperPass::getAnalysisUsage(), llvm::RegBankSelect::getAnalysisUsage(), llvm::SelectionDAGISelLegacy::getAnalysisUsage(), llvm::SlotIndexesWrapperPass::getAnalysisUsage(), llvm::VirtRegMapWrapperLegacy::getAnalysisUsage(), llvm::WebAssemblyExceptionInfo::getAnalysisUsage(), RemoveLoadsIntoFakeUsesLegacy::getAnalysisUsage(), SILowerI1CopiesLegacy::getAnalysisUsage(), StaticDataSplitter::getAnalysisUsage(), INITIALIZE_PASS(), INITIALIZE_PASS(), INITIALIZE_PASS(), INITIALIZE_PASS(), INITIALIZE_PASS_BEGIN(), and runOnMachineFunction().

getClearedProperties()

getRequiredProperties()

getSetProperties()

runOnMachineFunction()

virtual bool llvm::MachineFunctionPass::runOnMachineFunction ( MachineFunction & MF) protectedpure virtual

runOnMachineFunction - This method must be overloaded to perform the desired machine code transformation or analysis.

Implemented in GCEmptyBasicBlocks, llvm::AMDGPUAsmPrinter, llvm::AMDGPUDAGToDAGISelLegacy, llvm::AMDGPUResourceUsageAnalysisWrapperPass, llvm::ARMAsmPrinter, llvm::ARMBlockPlacement, llvm::AsmPrinter, llvm::AVRFrameAnalyzer, llvm::BasicBlockMatchingAndInference, llvm::CFIFixup, llvm::CSKYAsmPrinter, llvm::DetectRoundChange, llvm::ErrataWorkaround, llvm::ExecutionDomainFix, llvm::FixAllFDIVSQRT, llvm::GCNRegPressurePrinter, llvm::GISelCSEAnalysisWrapperPass, llvm::GISelValueTrackingAnalysisLegacy, llvm::HexagonAsmPrinter, llvm::InsertNOPLoad, llvm::InstructionSelect, llvm::IRTranslator, llvm::LazyMachineBlockFrequencyInfoPass, llvm::Legalizer, llvm::LiveDebugVariablesWrapperLegacy, llvm::LiveIntervalsWrapperPass, llvm::LiveRegMatrixWrapperLegacy, llvm::LiveStacksWrapperLegacy, llvm::LiveVariablesWrapperPass, llvm::LoadStoreOpt, llvm::Localizer, llvm::LoongArchAsmPrinter, llvm::M68kAsmPrinter, llvm::MachineBlockFrequencyInfoWrapperPass, llvm::MachineBlockHashInfo, llvm::MachineCycleInfoWrapperPass, llvm::MachineDominanceFrontier, llvm::MachineDominatorTreeWrapperPass, llvm::MachineLoopInfoWrapperPass, llvm::MachineOptimizationRemarkEmitterPass, llvm::MachinePipeliner, llvm::MachinePostDominatorTreeWrapperPass, llvm::MachineRegionInfoPass, llvm::MachineTraceMetricsWrapperPass, llvm::MachineUniformityAnalysisPass, llvm::MipsAsmPrinter, llvm::MIR2VecPrinterLegacyPass, llvm::MIR2VecVocabPrinterLegacyPass, llvm::NVPTXAsmPrinter, llvm::R600AsmPrinter, llvm::RABasic, llvm::ReachingDefInfoWrapperPass, llvm::RegBankSelect, llvm::SelectionDAGISelLegacy, llvm::SlotIndexesWrapperPass, llvm::SystemZAsmPrinter, llvm::ThunkInserterPass< Inserters >, llvm::VirtRegMapWrapperLegacy, llvm::WebAssemblyAsmPrinter, llvm::WebAssemblyExceptionInfo, llvm::X86AsmPrinter, RemoveLoadsIntoFakeUsesLegacy, SILowerI1CopiesLegacy, and StaticDataSplitter.

References getAnalysisUsage().


The documentation for this class was generated from the following files: