15 #ifndef MLIR_IR_ITERATORS_H
16 #define MLIR_IR_ITERATORS_H
23 #include "llvm/ADT/DepthFirstIterator.h"
24 #include "llvm/ADT/PostOrderIterator.h"
31 template <
typename RangeT>
47 template <
bool NoGraphRegions = false>
61 Block *
null =
nullptr;
62 auto it = region.
empty()
63 ? llvm::make_range(llvm::df_end(
null), llvm::df_end(
null))
64 : llvm::depth_first(®ion.
front());
67 return llvm::make_pointee_range(it);
84 template <
bool NoGraphRegions = false>
103 Block *
null =
nullptr;
104 auto it = region.
empty()
105 ? llvm::make_range(llvm::po_end(
null), llvm::po_end(
null))
106 : llvm::post_order(®ion.
front());
109 return llvm::make_pointee_range(it);
Block represents an ordered list of Operations.
Operation is the basic unit of execution within MLIR.
This class contains a list of basic blocks and a link to the parent operation it is attached to.
Include the generated interface declarations.
bool mayHaveSSADominance(Region ®ion)
Return "true" if the given region may have SSA dominance.
This iterator enumerates elements according to their dominance relationship.
static auto makeIterable(Region ®ion)
static Block & makeIterable(Block &range)
static MutableArrayRef< Region > makeIterable(Operation &range)
static MutableArrayRef< Region > makeIterable(Operation &range)
Make operations iterable: return the list of regions.
This iterator enumerates elements according to their reverse dominance relationship.
static constexpr auto makeIterable(Block &range)
static auto makeIterable(Region ®ion)
static constexpr auto makeIterable(Operation &range)
This iterator enumerates elements in "reverse" order.
static constexpr auto makeIterable(RangeT &&range)