LLVM 18.0.0git
|
MachineFunctionPassManager adds/removes below features to/from the base PassManager template instantiation. More...
#include "llvm/CodeGen/MachinePassManager.h"
Public Member Functions | |
MachineFunctionPassManager (bool RequireCodeGenSCCOrder=false, bool VerifyMachineFunction=false) | |
MachineFunctionPassManager (MachineFunctionPassManager &&)=default | |
MachineFunctionPassManager & | operator= (MachineFunctionPassManager &&)=default |
Error | run (Module &M, MachineFunctionAnalysisManager &MFAM) |
Run machine passes for a Module. | |
template<typename PassT > | |
void | addPass (PassT &&Pass) |
![]() | |
PassManager ()=default | |
Construct a pass manager. | |
PassManager (PassManager &&Arg) | |
PassManager & | operator= (PassManager &&RHS) |
void | printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName) |
PreservedAnalyses | run (MachineFunction &IR, MachineFunctionAnalysisManager &AM, ExtraArgTs... ExtraArgs) |
Run all of the passes in this manager over the given unit of IR. | |
PreservedAnalyses | run (LazyCallGraph::SCC &InitialC, CGSCCAnalysisManager &AM, LazyCallGraph &G, CGSCCUpdateResult &UR) |
PreservedAnalyses | run (LazyCallGraph::SCC &InitialC, CGSCCAnalysisManager &AM, LazyCallGraph &G, CGSCCUpdateResult &UR) |
Explicitly specialize the pass manager run method to handle call graph updates. | |
LLVM_ATTRIBUTE_MINSIZE std::enable_if_t<!std::is_same< PassT, PassManager >::value > | addPass (PassT &&Pass) |
LLVM_ATTRIBUTE_MINSIZE std::enable_if_t< std::is_same< PassT, PassManager >::value > | addPass (PassT &&Pass) |
When adding a pass manager pass that has the same type as this pass manager, simply move the passes over. | |
bool | isEmpty () const |
Returns if the pass manager contains any passes. | |
![]() | |
void | printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName) |
Additional Inherited Members | |
![]() | |
static bool | isRequired () |
![]() | |
static StringRef | name () |
Gets the name of the pass we are mixed into. | |
![]() | |
using | PassConceptT = detail::PassConcept< MachineFunction, MachineFunctionAnalysisManager, ExtraArgTs... > |
![]() | |
std::vector< std::unique_ptr< PassConceptT > > | Passes |
MachineFunctionPassManager adds/removes below features to/from the base PassManager template instantiation.
Support machine module pass which runs over the module (for example, MachineOutliner). A machine module pass needs to define the method:
Error run(Module &, MachineFunctionAnalysisManager &)
FIXME: machine module passes still need to define the usual machine function pass interface, namely, PreservedAnalyses run(MachineFunction &, MachineFunctionAnalysisManager &)
But this interface wouldn't be executed. It is just a placeholder to satisfy the pass manager type-erased inteface. This special-casing of machine module pass is due to its limited use cases and the unnecessary complexity it may bring to the machine pass manager.
run
method is replaced by an alternative run
method. See details below.Definition at line 132 of file MachinePassManager.h.
|
inline |
Definition at line 137 of file MachinePassManager.h.
|
default |
|
inline |
Definition at line 154 of file MachinePassManager.h.
Referenced by llvm::CodeGenPassBuilder< DerivedT >::AddMachinePass::insertPass(), and llvm::CodeGenPassBuilder< DerivedT >::AddMachinePass::operator()().
|
default |
Error llvm::MachineFunctionPassManager::run | ( | Module & | M, |
MachineFunctionAnalysisManager & | MFAM | ||
) |
Run machine passes for a Module.
The intended use is to start the codegen pipeline for a Module. The base class's run
method is deliberately hidden by this due to the observation that we don't yet have the use cases of compositing two instances of machine pass managers, or compositing machine pass managers with other types of pass managers.
Definition at line 25 of file MachinePassManager.cpp.
References assert(), E, F, llvm::MachineFunctionAnalysisManager::getResult(), I, Idx, llvm::AnalysisManager< IRUnitT, ExtraArgTs >::invalidate(), IR, P, llvm::PassManager< MachineFunction, MachineFunctionAnalysisManager >::Passes, llvm::PassInstrumentation::pushBeforeNonSkippedPassCallback(), llvm::PassInstrumentation::runAfterPass(), llvm::PassInstrumentation::runBeforePass(), Size, llvm::Error::success(), and llvm::verifyMachineFunction().