15#ifndef MLIR_IR_REGIONGRAPHTRAITS_H
16#define MLIR_IR_REGIONGRAPHTRAITS_H
19#include "llvm/ADT/GraphTraits.h"
23struct GraphTraits<
mlir::Block *> {
39struct GraphTraits<Inverse<
mlir::Block *>> {
44 return inverseGraph.Graph;
55struct GraphTraits<const
mlir::Block *> {
63 return const_cast<mlir::Block *
>(node)->succ_begin();
73struct GraphTraits<Inverse<const
mlir::Block *>> {
79 return inverseGraph.Graph;
83 return const_cast<mlir::Block *
>(node)->pred_begin();
91struct GraphTraits<
mlir::Region *> :
public GraphTraits<mlir::Block *> {
114struct GraphTraits<Inverse<
mlir::Region *>>
115 :
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
unsigned getBlockID() const
Return an ID uniquely identifying this block within its parent region.
This class contains a list of basic blocks and a link to the parent operation it is attached to.
unsigned getMaxBlockID() const
One past the largest block ID handed out in this region; block IDs lie in [0, getMaxBlockID()).
unsigned getBlockIDEpoch() const
The block-ID epoch, part of the generic number-indexed graph contract (LoopInfo, DominatorTree) for d...
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)
mlir::Block::pred_iterator ChildIteratorType
static ChildIteratorType child_end(NodeRef node)
static NodeRef getEntryNode(Inverse< NodeRef > inverseGraph)
mlir::Block::pred_iterator ChildIteratorType
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 unsigned getNumber(NodeRef node)
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 unsigned getNumber(NodeRef node)
static NodeRef getEntryNode(NodeRef bb)
static unsigned getNumberEpoch(GraphType region)
static NodeRef getEntryNode(GraphType fn)
static nodes_iterator nodes_begin(GraphType fn)
pointer_iterator< mlir::Region::iterator > nodes_iterator
static unsigned getMaxNumber(GraphType region)
static nodes_iterator nodes_end(GraphType fn)