My Project
|
#include <Region.h>
Public Types | |
using | BlockListType = llvm::iplist< Block > |
using | iterator = BlockListType::iterator |
using | reverse_iterator = BlockListType::reverse_iterator |
Public Member Functions | |
Region ()=default | |
Region (Operation *container) | |
~Region () | |
MLIRContext * | getContext () |
Location | getLoc () |
BlockListType & | getBlocks () |
iterator | begin () |
iterator | end () |
reverse_iterator | rbegin () |
reverse_iterator | rend () |
bool | empty () |
void | push_back (Block *block) |
void | push_front (Block *block) |
Block & | back () |
Block & | front () |
Region * | getParentRegion () |
Operation * | getParentOp () |
Return the parent operation this region is attached to. More... | |
template<typename ParentT > | |
ParentT | getParentOfType () |
unsigned | getRegionNumber () |
Return the number of this region in the parent operation. More... | |
bool | isProperAncestor (Region *other) |
Return true if this region is a proper ancestor of the other region. More... | |
bool | isAncestor (Region *other) |
void | cloneInto (Region *dest, BlockAndValueMapping &mapper) |
void | cloneInto (Region *dest, Region::iterator destPos, BlockAndValueMapping &mapper) |
Clone this region into 'dest' before the given position in 'dest'. More... | |
void | takeBody (Region &other) |
bool | isIsolatedFromAbove (Optional< Location > noteLoc=llvm::None) |
void | dropAllReferences () |
template<typename FnT , typename RetT = detail::walkResultType<FnT>> | |
std::enable_if< std::is_same< RetT, void >::value, RetT >::type | walk (FnT &&callback) |
template<typename FnT , typename RetT = detail::walkResultType<FnT>> | |
std::enable_if< std::is_same< RetT, WalkResult >::value, RetT >::type | walk (FnT &&callback) |
void | viewGraph (const Twine ®ionName) |
void | viewGraph () |
Static Public Member Functions | |
static BlockListType Region::* | getSublistAccess (Block *) |
getSublistAccess() - Returns pointer to member of region. More... | |
This class contains a list of basic blocks and a link to the parent operation it is attached to.
using mlir::Region::BlockListType = llvm::iplist<Block> |
using mlir::Region::iterator = BlockListType::iterator |
using mlir::Region::reverse_iterator = BlockListType::reverse_iterator |
|
default |
|
explicit |
Region::~Region | ( | ) |
|
inline |
|
inline |
void Region::cloneInto | ( | Region * | dest, |
BlockAndValueMapping & | mapper | ||
) |
Clone the internal blocks from this region into dest. Any cloned blocks are appended to the back of dest. If the mapper contains entries for block arguments, these arguments are not included in the respective cloned block.
Clone the internal blocks from this region into dest
. Any cloned blocks are appended to the back of dest.
void Region::cloneInto | ( | Region * | dest, |
Region::iterator | destPos, | ||
BlockAndValueMapping & | mapper | ||
) |
Clone this region into 'dest' before the given position in 'dest'.
void Region::dropAllReferences | ( | ) |
Drop all operand uses from operations within this region, which is an essential step in breaking cyclic dependences between references when they are to be deleted.
|
inline |
|
inline |
|
inline |
|
inline |
MLIRContext * Region::getContext | ( | ) |
Return the context this region is inserted in. The region must have a valid parent container.
Location Region::getLoc | ( | ) |
Return a location for this region. This is the location attached to the parent container. The region must have a valid parent container.
|
inline |
Find the first parent operation of the given type, or nullptr if there is no ancestor operation.
Operation * Region::getParentOp | ( | ) |
Return the parent operation this region is attached to.
Region * Region::getParentRegion | ( | ) |
Return the region containing this region or nullptr if the region is attached to a top-level operation.
unsigned Region::getRegionNumber | ( | ) |
Return the number of this region in the parent operation.
|
inlinestatic |
getSublistAccess() - Returns pointer to member of region.
|
inline |
Return true if this region is ancestor of the other
region. A region is considered as its own ancestor, use isProperAncestor
to avoid this.
Check that this does not use any value defined outside it. Emit errors if noteLoc
is provided; this location is used to point to the operation containing the region, the actual error is reported at the operation with an offending use.
bool Region::isProperAncestor | ( | Region * | other | ) |
Return true if this region is a proper ancestor of the other
region.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Takes body of another region (that region will have no body after this operation completes). The current body of this region is cleared.
void mlir::Region::viewGraph | ( | const Twine & | regionName | ) |
Displays the CFG in a window. This is for use from the debugger and depends on Graphviz to generate the graph. This function is defined in ViewRegionGraph and only works with that target linked.
void mlir::Region::viewGraph | ( | ) |
|
inline |
Walk the operations in this region in postorder, calling the callback for each operation. This method is invoked for void-returning callbacks. See Operation::walk for more details.
|
inline |
Walk the operations in this region in postorder, calling the callback for each operation. This method is invoked for interruptible callbacks. See Operation::walk for more details.