MLIR  17.0.0git
Public Member Functions | List of all members
mlir::SideEffects::EffectInstance< EffectT > Class Template Reference

This class represents a specific instance of an effect. More...

#include "mlir/Interfaces/SideEffectInterfaces.h"

Public Member Functions

 EffectInstance (EffectT *effect, Resource *resource=DefaultResource::get())
 
 EffectInstance (EffectT *effect, Value value, Resource *resource=DefaultResource::get())
 
 EffectInstance (EffectT *effect, SymbolRefAttr symbol, Resource *resource=DefaultResource::get())
 
 EffectInstance (EffectT *effect, Attribute parameters, Resource *resource=DefaultResource::get())
 
 EffectInstance (EffectT *effect, Value value, Attribute parameters, Resource *resource=DefaultResource::get())
 
 EffectInstance (EffectT *effect, SymbolRefAttr symbol, Attribute parameters, Resource *resource=DefaultResource::get())
 
EffectT * getEffect () const
 Return the effect being applied. More...
 
Value getValue () const
 Return the value the effect is applied on, or nullptr if there isn't a known value being affected. More...
 
SymbolRefAttr getSymbolRef () const
 Return the symbol reference the effect is applied on, or nullptr if there isn't a known smbol being affected. More...
 
ResourcegetResource () const
 Return the resource that the effect applies to. More...
 
Attribute getParameters () const
 Return the parameters of the effect, if any. More...
 

Detailed Description

template<typename EffectT>
class mlir::SideEffects::EffectInstance< EffectT >

This class represents a specific instance of an effect.

It contains the effect being applied, a resource that corresponds to where the effect is applied, and an optional symbol reference or value(either operand, result, or region entry argument) that the effect is applied to, and an optional parameters attribute further specifying the details of the effect.

Definition at line 139 of file SideEffectInterfaces.h.

Constructor & Destructor Documentation

◆ EffectInstance() [1/6]

template<typename EffectT >
mlir::SideEffects::EffectInstance< EffectT >::EffectInstance ( EffectT *  effect,
Resource resource = DefaultResource::get() 
)
inline

Definition at line 141 of file SideEffectInterfaces.h.

◆ EffectInstance() [2/6]

template<typename EffectT >
mlir::SideEffects::EffectInstance< EffectT >::EffectInstance ( EffectT *  effect,
Value  value,
Resource resource = DefaultResource::get() 
)
inline

Definition at line 143 of file SideEffectInterfaces.h.

◆ EffectInstance() [3/6]

template<typename EffectT >
mlir::SideEffects::EffectInstance< EffectT >::EffectInstance ( EffectT *  effect,
SymbolRefAttr  symbol,
Resource resource = DefaultResource::get() 
)
inline

Definition at line 146 of file SideEffectInterfaces.h.

◆ EffectInstance() [4/6]

template<typename EffectT >
mlir::SideEffects::EffectInstance< EffectT >::EffectInstance ( EffectT *  effect,
Attribute  parameters,
Resource resource = DefaultResource::get() 
)
inline

Definition at line 149 of file SideEffectInterfaces.h.

◆ EffectInstance() [5/6]

template<typename EffectT >
mlir::SideEffects::EffectInstance< EffectT >::EffectInstance ( EffectT *  effect,
Value  value,
Attribute  parameters,
Resource resource = DefaultResource::get() 
)
inline

Definition at line 152 of file SideEffectInterfaces.h.

◆ EffectInstance() [6/6]

template<typename EffectT >
mlir::SideEffects::EffectInstance< EffectT >::EffectInstance ( EffectT *  effect,
SymbolRefAttr  symbol,
Attribute  parameters,
Resource resource = DefaultResource::get() 
)
inline

Definition at line 156 of file SideEffectInterfaces.h.

Member Function Documentation

◆ getEffect()

template<typename EffectT >
EffectT* mlir::SideEffects::EffectInstance< EffectT >::getEffect ( ) const
inline

Return the effect being applied.

Definition at line 162 of file SideEffectInterfaces.h.

Referenced by mlir::transform::TransformState::applyTransform(), mlir::hasEffect(), hasEffect(), and wouldOpBeTriviallyDeadImpl().

◆ getParameters()

template<typename EffectT >
Attribute mlir::SideEffects::EffectInstance< EffectT >::getParameters ( ) const
inline

Return the parameters of the effect, if any.

Definition at line 178 of file SideEffectInterfaces.h.

◆ getResource()

template<typename EffectT >
Resource* mlir::SideEffects::EffectInstance< EffectT >::getResource ( ) const
inline

Return the resource that the effect applies to.

Definition at line 175 of file SideEffectInterfaces.h.

Referenced by mlir::transform::TransformState::applyTransform(), and hasEffect().

◆ getSymbolRef()

template<typename EffectT >
SymbolRefAttr mlir::SideEffects::EffectInstance< EffectT >::getSymbolRef ( ) const
inline

Return the symbol reference the effect is applied on, or nullptr if there isn't a known smbol being affected.

Definition at line 170 of file SideEffectInterfaces.h.

References mlir::Value::dyn_cast().

◆ getValue()

template<typename EffectT >
Value mlir::SideEffects::EffectInstance< EffectT >::getValue ( ) const
inline

Return the value the effect is applied on, or nullptr if there isn't a known value being affected.

Definition at line 166 of file SideEffectInterfaces.h.

References mlir::Value::dyn_cast().

Referenced by mlir::hasEffect(), mlir::transform::detail::verifyTransformOpInterface(), and wouldOpBeTriviallyDeadImpl().


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