MLIR  20.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, int stage, bool effectOnFullRegion, Resource *resource=DefaultResource::get())
 
template<typename T , std::enable_if_t< llvm::is_one_of< T, OpOperand *, OpResult, BlockArgument >::value, bool > = true>
 EffectInstance (EffectT *effect, T value, Resource *resource=DefaultResource::get())
 
template<typename T , std::enable_if_t< llvm::is_one_of< T, OpOperand *, OpResult, BlockArgument >::value, bool > = true>
 EffectInstance (EffectT *effect, T value, int stage, bool effectOnFullRegion, Resource *resource=DefaultResource::get())
 
 EffectInstance (EffectT *effect, SymbolRefAttr symbol, Resource *resource=DefaultResource::get())
 
 EffectInstance (EffectT *effect, SymbolRefAttr symbol, int stage, bool effectOnFullRegion, Resource *resource=DefaultResource::get())
 
 EffectInstance (EffectT *effect, Attribute parameters, Resource *resource=DefaultResource::get())
 
 EffectInstance (EffectT *effect, Attribute parameters, int stage, bool effectOnFullRegion, Resource *resource=DefaultResource::get())
 
template<typename T , std::enable_if_t< llvm::is_one_of< T, OpOperand *, OpResult, BlockArgument >::value, bool > = true>
 EffectInstance (EffectT *effect, T value, Attribute parameters, Resource *resource=DefaultResource::get())
 
template<typename T , std::enable_if_t< llvm::is_one_of< T, OpOperand *, OpResult, BlockArgument >::value, bool > = true>
 EffectInstance (EffectT *effect, T value, Attribute parameters, int stage, bool effectOnFullRegion, Resource *resource=DefaultResource::get())
 
 EffectInstance (EffectT *effect, SymbolRefAttr symbol, Attribute parameters, Resource *resource=DefaultResource::get())
 
 EffectInstance (EffectT *effect, SymbolRefAttr symbol, Attribute parameters, int stage, bool effectOnFullRegion, 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...
 
template<typename T , std::enable_if_t< llvm::is_one_of< T, OpOperand *, OpResult, BlockArgument >::value, bool > = true>
getEffectValue () const
 Returns the OpOperand effect is applied on, or nullptr if there isn't a known value being effected. 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...
 
int getStage () const
 Return the effect happen stage. More...
 
bool getEffectOnFullRegion () const
 Return if this side effect act on every single value of resource. 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/12]

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/12]

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

Definition at line 144 of file SideEffectInterfaces.h.

◆ EffectInstance() [3/12]

template<typename EffectT >
template<typename T , std::enable_if_t< llvm::is_one_of< T, OpOperand *, OpResult, BlockArgument >::value, bool > = true>
mlir::SideEffects::EffectInstance< EffectT >::EffectInstance ( EffectT *  effect,
value,
Resource resource = DefaultResource::get() 
)
inline

Definition at line 152 of file SideEffectInterfaces.h.

◆ EffectInstance() [4/12]

template<typename EffectT >
template<typename T , std::enable_if_t< llvm::is_one_of< T, OpOperand *, OpResult, BlockArgument >::value, bool > = true>
mlir::SideEffects::EffectInstance< EffectT >::EffectInstance ( EffectT *  effect,
value,
int  stage,
bool  effectOnFullRegion,
Resource resource = DefaultResource::get() 
)
inline

Definition at line 160 of file SideEffectInterfaces.h.

◆ EffectInstance() [5/12]

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

Definition at line 164 of file SideEffectInterfaces.h.

◆ EffectInstance() [6/12]

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

Definition at line 168 of file SideEffectInterfaces.h.

◆ EffectInstance() [7/12]

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

Definition at line 173 of file SideEffectInterfaces.h.

◆ EffectInstance() [8/12]

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

Definition at line 177 of file SideEffectInterfaces.h.

◆ EffectInstance() [9/12]

template<typename EffectT >
template<typename T , std::enable_if_t< llvm::is_one_of< T, OpOperand *, OpResult, BlockArgument >::value, bool > = true>
mlir::SideEffects::EffectInstance< EffectT >::EffectInstance ( EffectT *  effect,
value,
Attribute  parameters,
Resource resource = DefaultResource::get() 
)
inline

Definition at line 186 of file SideEffectInterfaces.h.

◆ EffectInstance() [10/12]

template<typename EffectT >
template<typename T , std::enable_if_t< llvm::is_one_of< T, OpOperand *, OpResult, BlockArgument >::value, bool > = true>
mlir::SideEffects::EffectInstance< EffectT >::EffectInstance ( EffectT *  effect,
value,
Attribute  parameters,
int  stage,
bool  effectOnFullRegion,
Resource resource = DefaultResource::get() 
)
inline

Definition at line 194 of file SideEffectInterfaces.h.

◆ EffectInstance() [11/12]

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

Definition at line 200 of file SideEffectInterfaces.h.

◆ EffectInstance() [12/12]

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

Definition at line 204 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 212 of file SideEffectInterfaces.h.

Referenced by mlir::hasEffect(), hasEffect(), maybeCaptured(), and wouldOpBeTriviallyDeadImpl().

◆ getEffectOnFullRegion()

template<typename EffectT >
bool mlir::SideEffects::EffectInstance< EffectT >::getEffectOnFullRegion ( ) const
inline

Return if this side effect act on every single value of resource.

Definition at line 256 of file SideEffectInterfaces.h.

◆ getEffectValue()

template<typename EffectT >
template<typename T , std::enable_if_t< llvm::is_one_of< T, OpOperand *, OpResult, BlockArgument >::value, bool > = true>
T mlir::SideEffects::EffectInstance< EffectT >::getEffectValue ( ) const
inline

Returns the OpOperand effect is applied on, or nullptr if there isn't a known value being effected.

Definition at line 235 of file SideEffectInterfaces.h.

Referenced by mlir::hasEffect().

◆ getParameters()

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

Return the parameters of the effect, if any.

Definition at line 250 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 247 of file SideEffectInterfaces.h.

Referenced by hasEffect(), and mayAlias().

◆ getStage()

template<typename EffectT >
int mlir::SideEffects::EffectInstance< EffectT >::getStage ( ) const
inline

Return the effect happen stage.

Definition at line 253 of file SideEffectInterfaces.h.

◆ 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 241 of file SideEffectInterfaces.h.

◆ 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 216 of file SideEffectInterfaces.h.

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


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