|
MLIR 22.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 |
| The following are a set of methods only enabled when the parent operation has a single region. | |
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. | |
| template<typename OpT = ConcreteType> | |
| enable_if_single_region< OpT > | insert (Operation *insertPt, Operation *op) |
| Insert the operation at the given insertion point. | |
| 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 | |
| Protected Member Functions inherited from mlir::OpTrait::TraitBase< ConcreteType, SingleBlock > | |
| Operation * | getOperation () |
| Return the ultimate Operation being worked on. | |
This class provides APIs and verifiers for ops with regions having a single block.
Definition at line 881 of file OpDefinition.h.
| using mlir::OpTrait::SingleBlock< ConcreteType >::enable_if_single_region |
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 923 of file OpDefinition.h.
|
inline |
Definition at line 927 of file OpDefinition.h.
References mlir::Block::begin(), and getBody().
Referenced by front().
|
inline |
Definition at line 931 of file OpDefinition.h.
References mlir::Block::end(), and getBody().
Referenced by push_back().
|
inline |
Definition at line 935 of file OpDefinition.h.
References begin().
|
inline |
Definition at line 905 of file OpDefinition.h.
References mlir::Region::empty(), mlir::Region::front(), mlir::OpTrait::TraitBase< ConcreteType, SingleBlock >::getOperation(), and mlir::Operation::getRegion().
Referenced by begin(), end(), insert(), and push_back().
|
inline |
Definition at line 910 of file OpDefinition.h.
References mlir::OpTrait::TraitBase< ConcreteType, SingleBlock >::getOperation(), and mlir::Operation::getRegion().
|
inline |
Definition at line 951 of file OpDefinition.h.
References getBody(), and mlir::Block::getOperations().
|
inline |
Insert the operation at the given insertion point.
Definition at line 947 of file OpDefinition.h.
References insert().
Referenced by insert(), and push_back().
|
inline |
Insert the operation into the back of the body.
Definition at line 941 of file OpDefinition.h.
|
inlinestatic |
Definition at line 883 of file OpDefinition.h.
References mlir::Operation::emitOpError(), mlir::Block::empty(), mlir::Region::empty(), mlir::Region::front(), mlir::Operation::getNumRegions(), mlir::Operation::getRegion(), mlir::Region::hasOneBlock(), and success().