MLIR
20.0.0git
|
An action is a specific action that is to be taken by the compiler, that can be toggled and controlled by an external user. More...
#include "mlir/IR/Action.h"
Public Member Functions | |
virtual | ~Action ()=default |
TypeID | getActionID () const |
Return the unique action id of this action, use for casting functionality. More... | |
virtual StringRef | getTag () const =0 |
Return a string "tag" which intends to uniquely identify this type of action. More... | |
virtual void | print (raw_ostream &os) const |
virtual ArrayRef< IRUnit > | getContextIRUnits () const |
Return the set of IR units that are associated with this action. More... | |
Protected Member Functions | |
Action (TypeID actionID, ArrayRef< IRUnit > irUnits) | |
Protected Attributes | |
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... | |
An action is a specific action that is to be taken by the compiler, that can be toggled and controlled by an external user.
There are no constraints on the granularity of an action, it could be as simple as "perform this fold" and as complex as "run this pass pipeline".
This class represents the base class of the ActionImpl class (see below). This holds the template-invariant elements of the Action class.
|
virtualdefault |
|
inline |
Return the unique action id of this action, use for casting functionality.
Definition at line 44 of file Action.h.
References actionID.
Referenced by mlir::tracing::ActionImpl< Derived >::classof().
Return the set of IR units that are associated with this action.
Definition at line 55 of file Action.h.
References irUnits.
Referenced by mlir::tracing::ActionLogger::beforeExecute(), mlir::PassExecutionAction::getOp(), mlir::tracing::FileLineColLocBreakpointManager::match(), and mlir::tracing::ActionActiveStack::print().
|
pure virtual |
Return a string "tag" which intends to uniquely identify this type of action.
For example "pass-application" or "pattern-rewrite".
Implemented in mlir::tracing::ActionImpl< Derived >, mlir::tracing::ActionImpl< ApplyPatternAction >, and mlir::tracing::ActionImpl< PassExecutionAction >.
Referenced by mlir::tracing::ActionLogger::afterExecute(), mlir::tracing::ActionLogger::beforeExecute(), mlir::tracing::TagBreakpointManager::match(), mlir::tracing::DebugCounter::operator()(), and print().
|
inlinevirtual |
Reimplemented in mlir::ApplyPatternAction, and mlir::PassExecutionAction.
Definition at line 50 of file Action.h.
References getTag().
Referenced by mlir::tracing::ActionLogger::beforeExecute(), and mlir::tracing::ActionActiveStack::print().
|
protected |
The type of the derived action class, used for isa
/dyn_cast
.
Definition at line 62 of file Action.h.
Referenced by getActionID().
Set of IR units (operations, regions, blocks, values) that are associated with this action.
Definition at line 66 of file Action.h.
Referenced by getContextIRUnits(), and mlir::PassExecutionAction::getOp().