LLVM 20.0.0git
|
Base class. More...
#include "llvm/SandboxIR/PassManager.h"
Public Types | |
using | CreatePassFunc = std::function< std::unique_ptr< ContainedPass >(StringRef, StringRef)> |
Public Member Functions | |
void | addPass (std::unique_ptr< ContainedPass > Pass) |
Adds Pass to the pass pipeline. | |
void | setPassPipeline (StringRef Pipeline, CreatePassFunc CreatePass) |
Parses Pipeline as a comma-separated sequence of pass names and sets the pass pipeline, using CreatePass to instantiate passes by name. | |
void | print (raw_ostream &OS) const override |
LLVM_DUMP_METHOD void | dump () const override |
void | printPipeline (raw_ostream &OS) const override |
Similar to print() but prints one pass per line. Used for testing. | |
Protected Member Functions | |
PassManager (StringRef Name) | |
PassManager (StringRef Name, StringRef Pipeline, CreatePassFunc CreatePass) | |
PassManager (const PassManager &)=delete | |
PassManager (PassManager &&)=default | |
virtual | ~PassManager ()=default |
PassManager & | operator= (const PassManager &)=delete |
Protected Attributes | |
SmallVector< std::unique_ptr< ContainedPass > > | Passes |
The list of passes that this pass manager will run. | |
Base class.
Definition at line 34 of file PassManager.h.
using llvm::sandboxir::PassManager< ParentPass, ContainedPass >::CreatePassFunc = std::function<std::unique_ptr<ContainedPass>(StringRef, StringRef)> |
Definition at line 37 of file PassManager.h.
|
inlineprotected |
Definition at line 44 of file PassManager.h.
|
inlineprotected |
Definition at line 45 of file PassManager.h.
References llvm::sandboxir::PassManager< ParentPass, ContainedPass >::setPassPipeline().
|
protecteddelete |
|
protecteddefault |
|
protectedvirtualdefault |
|
inline |
Adds Pass
to the pass pipeline.
Definition at line 56 of file PassManager.h.
References llvm::sandboxir::PassManager< ParentPass, ContainedPass >::Passes, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by llvm::sandboxir::PassManager< ParentPass, ContainedPass >::setPassPipeline().
|
inlineoverride |
Definition at line 191 of file PassManager.h.
References llvm::dbgs(), and llvm::sandboxir::PassManager< ParentPass, ContainedPass >::print().
|
protecteddelete |
|
inlineoverride |
Definition at line 184 of file PassManager.h.
References llvm::sandboxir::Pass::getName(), getName(), llvm::interleave(), OS, and llvm::sandboxir::PassManager< ParentPass, ContainedPass >::Passes.
Referenced by llvm::sandboxir::PassManager< ParentPass, ContainedPass >::dump().
|
inlineoverride |
Similar to print() but prints one pass per line. Used for testing.
Definition at line 197 of file PassManager.h.
References getName(), OS, and llvm::sandboxir::PassManager< ParentPass, ContainedPass >::Passes.
Referenced by llvm::sandboxir::BottomUpVec::printPipeline().
|
inline |
Parses Pipeline
as a comma-separated sequence of pass names and sets the pass pipeline, using CreatePass
to instantiate passes by name.
Passes can have arguments, for example: "pass1<arg1,arg2>,pass2,pass3<arg3,arg4>"
The arguments between angle brackets are treated as a mostly opaque string and each pass is responsible for parsing its arguments. The exception to this are nested angle brackets, which must match pair-wise to allow arguments to contain nested pipelines, like:
"pass1<subpass1,subpass2<arg1,arg2>,subpass3>"
An empty args string is treated the same as no args, so "pass" and "pass<>" are equivalent.
Definition at line 76 of file PassManager.h.
References llvm::sandboxir::PassManager< ParentPass, ContainedPass >::addPass(), assert(), llvm::CallingConv::C, llvm::SmallVectorBase< Size_T >::empty(), llvm::StringRef::empty(), llvm::enumerate(), llvm::errs(), Idx, llvm::sandboxir::PassManager< ParentPass, ContainedPass >::Passes, PassName, and llvm::StringRef::slice().
Referenced by llvm::sandboxir::PassManager< ParentPass, ContainedPass >::PassManager(), and llvm::SandboxVectorizerPass::SandboxVectorizerPass().
|
protected |
The list of passes that this pass manager will run.
Definition at line 42 of file PassManager.h.
Referenced by llvm::sandboxir::PassManager< ParentPass, ContainedPass >::addPass(), llvm::sandboxir::PassManager< ParentPass, ContainedPass >::print(), llvm::sandboxir::PassManager< ParentPass, ContainedPass >::printPipeline(), and llvm::sandboxir::PassManager< ParentPass, ContainedPass >::setPassPipeline().