MLIR
21.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 880 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 922 of file OpDefinition.h.
|
inline |
Definition at line 926 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 930 of file OpDefinition.h.
References mlir::Block::end(), and mlir::OpTrait::SingleBlock< ConcreteType >::getBody().
Referenced by mlir::OpTrait::SingleBlock< ConcreteType >::push_back().
|
inline |
Definition at line 934 of file OpDefinition.h.
References mlir::OpTrait::SingleBlock< ConcreteType >::begin().
|
inline |
Definition at line 904 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(), mlir::OpTrait::SingleBlock< ConcreteType >::end(), mlir::OpTrait::SingleBlock< ConcreteType >::insert(), and mlir::OpTrait::SingleBlock< ConcreteType >::push_back().
|
inline |
Definition at line 909 of file OpDefinition.h.
References mlir::OpTrait::TraitBase< ConcreteType, SingleBlock >::getOperation(), and mlir::Operation::getRegion().
|
inline |
Definition at line 950 of file OpDefinition.h.
References mlir::OpTrait::SingleBlock< ConcreteType >::getBody(), and mlir::Block::getOperations().
|
inline |
Insert the operation at the given insertion point.
Definition at line 946 of file OpDefinition.h.
Referenced by mlir::OpTrait::SingleBlock< ConcreteType >::push_back().
|
inline |
Insert the operation into the back of the body.
Definition at line 940 of file OpDefinition.h.
References mlir::OpTrait::SingleBlock< ConcreteType >::end(), mlir::OpTrait::SingleBlock< ConcreteType >::getBody(), and mlir::OpTrait::SingleBlock< ConcreteType >::insert().
|
inlinestatic |
Definition at line 882 of file OpDefinition.h.
References mlir::Operation::emitOpError(), mlir::Block::empty(), mlir::Region::empty(), mlir::Region::front(), mlir::Operation::getNumRegions(), and mlir::Operation::getRegion().