MLIR
18.0.0git
|
This class provides APIs and verifiers for ops with regions having a single block. More...
#include "mlir/IR/OpDefinition.h"
Public Types | |
template<typename OpT , typename T = void> | |
using | enable_if_single_region = std::enable_if_t< OpT::template hasTrait< OneRegion >(), T > |
The following are a set of methods only enabled when the parent operation has a single region. More... | |
Public Member Functions | |
Block * | getBody (unsigned idx=0) |
Region & | getBodyRegion (unsigned idx=0) |
template<typename OpT = ConcreteType> | |
enable_if_single_region< OpT, Block::iterator > | begin () |
template<typename OpT = ConcreteType> | |
enable_if_single_region< OpT, Block::iterator > | end () |
template<typename OpT = ConcreteType> | |
enable_if_single_region< OpT, Operation & > | front () |
template<typename OpT = ConcreteType> | |
enable_if_single_region< OpT > | push_back (Operation *op) |
Insert the operation into the back of the body. More... | |
template<typename OpT = ConcreteType> | |
enable_if_single_region< OpT > | insert (Operation *insertPt, Operation *op) |
Insert the operation at the given insertion point. More... | |
template<typename OpT = ConcreteType> | |
enable_if_single_region< OpT > | insert (Block::iterator insertPt, Operation *op) |
Static Public Member Functions | |
static LogicalResult | verifyTrait (Operation *op) |
Additional Inherited Members | |
![]() | |
Operation * | getOperation () |
Return the ultimate Operation being worked on. More... | |
This class provides APIs and verifiers for ops with regions having a single block.
Definition at line 869 of file OpDefinition.h.
using mlir::OpTrait::SingleBlock< ConcreteType >::enable_if_single_region = std::enable_if_t<OpT::template hasTrait<OneRegion>(), T> |
The following are a set of methods only enabled when the parent operation has a single region.
Each of these methods take an additional template parameter that represents the concrete operation so that we can use SFINAE to disable the methods for non-single region operations.
Definition at line 911 of file OpDefinition.h.
|
inline |
Definition at line 915 of file OpDefinition.h.
References mlir::Block::begin(), and mlir::OpTrait::SingleBlock< ConcreteType >::getBody().
Referenced by mlir::OpTrait::SingleBlock< ConcreteType >::front().
|
inline |
Definition at line 919 of file OpDefinition.h.
References mlir::Block::end(), and mlir::OpTrait::SingleBlock< ConcreteType >::getBody().
|
inline |
Definition at line 923 of file OpDefinition.h.
References mlir::OpTrait::SingleBlock< ConcreteType >::begin().
|
inline |
Definition at line 893 of file OpDefinition.h.
References mlir::Region::empty(), mlir::Region::front(), mlir::OpTrait::TraitBase< ConcreteType, SingleBlock >::getOperation(), and mlir::Operation::getRegion().
Referenced by mlir::OpTrait::SingleBlock< ConcreteType >::begin(), and mlir::OpTrait::SingleBlock< ConcreteType >::end().
|
inline |
Definition at line 898 of file OpDefinition.h.
References mlir::OpTrait::TraitBase< ConcreteType, SingleBlock >::getOperation(), and mlir::Operation::getRegion().
|
inline |
Definition at line 939 of file OpDefinition.h.
|
inline |
Insert the operation at the given insertion point.
Definition at line 935 of file OpDefinition.h.
|
inline |
Insert the operation into the back of the body.
Definition at line 929 of file OpDefinition.h.
|
inlinestatic |
Definition at line 871 of file OpDefinition.h.