MLIR
20.0.0git
|
This class encapsulates the "action" of executing a single pass. More...
#include "mlir/Pass/Pass.h"
Public Member Functions | |
PassExecutionAction (ArrayRef< IRUnit > irUnits, const Pass &pass) | |
Define a TypeID for this PassExecutionAction. More... | |
void | print (raw_ostream &os) const override |
Print a textual version of this action to os . More... | |
const Pass & | getPass () const |
Get the pass that will be executed by this action. More... | |
Operation * | getOp () const |
Get the operation that is the base of this pass. More... | |
Public Member Functions inherited from mlir::tracing::ActionImpl< PassExecutionAction > | |
ActionImpl (ArrayRef< IRUnit > irUnits={}) | |
StringRef | getTag () const final |
Forward tag access to the derived class. More... | |
Public Member Functions inherited from mlir::tracing::Action | |
virtual | ~Action ()=default |
TypeID | getActionID () const |
Return the unique action id of this action, use for casting functionality. More... | |
virtual ArrayRef< IRUnit > | getContextIRUnits () const |
Return the set of IR units that are associated with this action. More... | |
Public Attributes | |
const Pass & | pass |
Reference to the pass being run. More... | |
Operation * | op |
The base op for this pass. More... | |
Static Public Attributes | |
static constexpr StringLiteral | tag = "pass-execution" |
The tag required by ActionImpl to identify this action. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from mlir::tracing::ActionImpl< PassExecutionAction > | |
static bool | classof (const Action *action) |
Provide classof to allow casting between action types. More... | |
Protected Member Functions inherited from mlir::tracing::Action | |
Action (TypeID actionID, ArrayRef< IRUnit > irUnits) | |
Protected Attributes inherited from mlir::tracing::Action | |
TypeID | actionID |
The type of the derived action class, used for isa /dyn_cast . More... | |
ArrayRef< IRUnit > | irUnits |
Set of IR units (operations, regions, blocks, values) that are associated with this action. More... | |
This class encapsulates the "action" of executing a single pass.
This allows a user of the Action infrastructure to query information about an action in (for example) a breakpoint context. You could use it like this:
auto onBreakpoint = [&](const ActionActiveStack *backtrace) { if (auto passExec = dyn_cast<PassExecutionAction>(anAction)) record(passExec.getPass()); return ExecutionContext::Apply; }; ExecutionContext exeCtx(onBreakpoint);
Define a TypeID for this PassExecutionAction.
Construct a PassExecutionAction. This is called by the OpToOpPassAdaptor when it calls executeAction
.
Operation * PassExecutionAction::getOp | ( | ) | const |
Get the operation that is the base of this pass.
For example, an OperationPass<ModuleOp> would return a ModuleOp.
Definition at line 48 of file Pass.cpp.
References mlir::tracing::Action::getContextIRUnits(), and mlir::tracing::Action::irUnits.
Referenced by print().
|
inline |
|
overridevirtual |
Print a textual version of this action to os
.
Reimplemented from mlir::tracing::Action.
Definition at line 43 of file Pass.cpp.
References mlir::Pass::getName(), getOp(), pass, and tag.
Operation* mlir::PassExecutionAction::op |
const Pass& mlir::PassExecutionAction::pass |
|
staticconstexpr |