|
virtual void | Init () |
| Function to override when you want to acquire resources.
|
|
virtual void | Run ()=0 |
| Function to override to run the pass.
|
|
virtual std::string_view | Name () const |
| Function to override to get the name (id) of the pass.
|
|
virtual std::string_view | Desc () const =0 |
| Function to override to get the description of the pass.
|
|
void | Preserve () |
| Preserve the analysis results of this pass.
|
|
bool | ShouldPreserve () const |
| Should this pass be preserved?
|
|
|
auto & | PM () |
| Gets the pass manager that owns the pass.
|
|
template<typename T > |
requires PassType< T > T & | GetPass () |
| Gets a single pass of type T. Throws if no pass is found. Also throws if multiple passes of type T are found. More...
|
|
Pass & | GetPass (std::string_view name) |
| Gets a single pass by name. Throws if no pass is found.
|
|
template<typename T > |
requires PassType< T > Generator< T * > | GetPasses () |
| Gets all passes of type T. Throws if no pass is found. More...
|
|
void | ComputeDependency (Pass &pass) |
| Computes a dependency between this and another pass. More...
|
|
CustomBufferResource * | NewHeap () |
| Requests a new heap from the pass manager. More...
|
|
virtual void | computeDependencies ()=0 |
| Overload to state the dependencies of this pass.
|
|
| Pass (PassManager &pm) noexcept |
| Constructor for the pass. More...
|
|
Definition at line 111 of file PassManager.h.
◆ Pass()
|
inlineexplicitprotectednoexcept |
Constructor for the pass.
- Parameters
-
pm | The pass manager that owns the pass |
Definition at line 170 of file PassManager.h.
◆ ComputeDependency()
void utils::Pass::ComputeDependency |
( |
Pass & |
pass | ) |
|
|
protected |
Computes a dependency between this and another pass.
- Parameters
-
pass | The pass to add as a dependency |
Definition at line 25 of file PassManager.cc.
32 if(state == PropagateEnabled) {
34 if(
PM().PO().IsPassDisabled(
this))
return;
36 PM().PO().setPassEnabled(&pass,
true);
37 pass.state = PropagateEnabled;
38 pass.computeDependencies();
42 for(
auto& heap :
PM().heaps_) {
43 if(heap.owner != &pass)
continue;
44 if(state == AcquireResources) {
46 }
else if(state == Cleanup) {
51 if(state == RegisterDependencies) {
52 PM().addDependency(*
this, pass);
auto & PM()
Gets the pass manager that owns the pass.
◆ GetPass()
template<typename T >
requires PassType< T > T & utils::Pass::GetPass |
|
protected |
Gets a single pass of type T. Throws if no pass is found. Also throws if multiple passes of type T are found.
- Template Parameters
-
- Returns
- T& The pass of type T
Definition at line 350 of file PassManager.h.
351 return PM().getPass<
T>(*this);
Wraps a value for expression evaluation. This distinguishes an LValue from an RValue,...
◆ GetPasses()
template<typename T >
requires PassType< T > Generator< T * > utils::Pass::GetPasses |
|
protected |
Gets all passes of type T. Throws if no pass is found.
- Template Parameters
-
- Returns
- A generator that yields all passes of type T
Definition at line 356 of file PassManager.h.
357 return PM().getPasses<
T>(*this);
◆ NewHeap()
Requests a new heap from the pass manager.
- Returns
- CustomBufferResource* The new heap
Definition at line 56 of file PassManager.cc.
56 {
return PM().newHeap(*
this); }
The documentation for this class was generated from the following files: