MLIR  20.0.0git
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
mlir::tracing::Action Class Referenceabstract

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"

+ Inheritance diagram for mlir::tracing::Action:

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< IRUnitgetContextIRUnits () 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< IRUnitirUnits
 Set of IR units (operations, regions, blocks, values) that are associated with this action. More...
 

Detailed Description

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.

Definition at line 38 of file Action.h.

Constructor & Destructor Documentation

◆ ~Action()

virtual mlir::tracing::Action::~Action ( )
virtualdefault

◆ Action()

mlir::tracing::Action::Action ( TypeID  actionID,
ArrayRef< IRUnit irUnits 
)
inlineprotected

Definition at line 58 of file Action.h.

Member Function Documentation

◆ getActionID()

TypeID mlir::tracing::Action::getActionID ( ) const
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().

◆ getContextIRUnits()

virtual ArrayRef<IRUnit> mlir::tracing::Action::getContextIRUnits ( ) const
inlinevirtual

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().

◆ getTag()

virtual StringRef mlir::tracing::Action::getTag ( ) const
pure virtual

◆ print()

virtual void mlir::tracing::Action::print ( raw_ostream &  os) const
inlinevirtual

Member Data Documentation

◆ actionID

TypeID mlir::tracing::Action::actionID
protected

The type of the derived action class, used for isa/dyn_cast.

Definition at line 62 of file Action.h.

Referenced by getActionID().

◆ irUnits

ArrayRef<IRUnit> mlir::tracing::Action::irUnits
protected

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().


The documentation for this class was generated from the following file: