15 #ifndef MLIR_IR_REGIONGRAPHTRAITS_H
16 #define MLIR_IR_REGIONGRAPHTRAITS_H
19 #include "llvm/ADT/GraphTraits.h"
23 struct GraphTraits<
mlir::Block *> {
37 struct GraphTraits<Inverse<
mlir::Block *>> {
42 return inverseGraph.Graph;
53 struct GraphTraits<const
mlir::Block *> {
61 return const_cast<mlir::Block *
>(node)->succ_begin();
69 struct GraphTraits<Inverse<const
mlir::Block *>> {
75 return inverseGraph.Graph;
79 return const_cast<mlir::Block *
>(node)->pred_begin();
87 struct GraphTraits<
mlir::Region *> :
public GraphTraits<mlir::Block *> {
103 struct GraphTraits<Inverse<
mlir::Region *>>
104 :
public GraphTraits<Inverse<mlir::Block *>> {
Block represents an ordered list of Operations.
SuccessorRange::iterator succ_iterator
pred_iterator pred_begin()
succ_iterator succ_begin()
PredecessorIterator pred_iterator
Implement a predecessor iterator for blocks.
This class contains a list of basic blocks and a link to the parent operation it is attached to.
The OpAsmOpInterface, see OpAsmInterface.td for more details.
Include the generated interface declarations.
static ChildIteratorType child_begin(NodeRef node)
static NodeRef getEntryNode(Inverse< NodeRef > inverseGraph)
static ChildIteratorType child_end(NodeRef node)
static ChildIteratorType child_end(NodeRef node)
static NodeRef getEntryNode(Inverse< NodeRef > inverseGraph)
static ChildIteratorType child_begin(NodeRef node)
static NodeRef getEntryNode(GraphType fn)
Inverse< mlir::Region * > GraphType
static nodes_iterator nodes_begin(GraphType fn)
static nodes_iterator nodes_end(GraphType fn)
pointer_iterator< mlir::Region::iterator > nodes_iterator
static ChildIteratorType child_begin(NodeRef node)
mlir::Block::succ_iterator ChildIteratorType
static NodeRef getEntryNode(NodeRef node)
static ChildIteratorType child_end(NodeRef node)
static ChildIteratorType child_end(NodeRef node)
mlir::Block::succ_iterator ChildIteratorType
static ChildIteratorType child_begin(NodeRef node)
static NodeRef getEntryNode(NodeRef bb)
static NodeRef getEntryNode(GraphType fn)
static nodes_iterator nodes_begin(GraphType fn)
pointer_iterator< mlir::Region::iterator > nodes_iterator
static nodes_iterator nodes_end(GraphType fn)