LLVM 19.0.0git
Classes | Namespaces | Macros | Functions
RegionIterator.h File Reference
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/GraphTraits.h"
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/Analysis/RegionInfo.h"
#include <cassert>
#include <iterator>
#include <type_traits>

Go to the source code of this file.

Classes

class  llvm::RNSuccIterator< NodeRef, BlockT, RegionT >
 Hierarchical RegionNode successor iterator. More...
 
class  llvm::RNSuccIterator< FlatIt< NodeRef >, BlockT, RegionT >
 Flat RegionNode iterator. More...
 
struct  llvm::GraphTraits< RegionInfo * >
 
struct  llvm::GraphTraits< RegionInfoPass * >
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Macros

#define RegionNodeGraphTraits(NodeT, BlockT, RegionT)
 
#define RegionGraphTraits(RegionT, NodeT)
 

Functions

template<class NodeRef , class BlockT , class RegionT >
RNSuccIterator< NodeRef, BlockT, RegionT > llvm::succ_begin (NodeRef Node)
 
template<class NodeRef , class BlockT , class RegionT >
RNSuccIterator< NodeRef, BlockT, RegionT > llvm::succ_end (NodeRef Node)
 
 llvm::RegionNodeGraphTraits (RegionNode, BasicBlock, Region)
 
 llvm::RegionGraphTraits (Region, RegionNode)
 

Macro Definition Documentation

◆ RegionGraphTraits

#define RegionGraphTraits (   RegionT,
  NodeT 
)
Value:
template <> struct GraphTraits<RegionT *> : public GraphTraits<NodeT *> { \
using nodes_iterator = df_iterator<NodeRef>; \
static NodeRef getEntryNode(RegionT *R) { \
return R->getNode(R->getEntry()); \
} \
static nodes_iterator nodes_begin(RegionT *R) { \
return nodes_iterator::begin(getEntryNode(R)); \
} \
static nodes_iterator nodes_end(RegionT *R) { \
return nodes_iterator::end(getEntryNode(R)); \
} \
}; \
template <> \
struct GraphTraits<FlatIt<RegionT *>> \
: public GraphTraits<FlatIt<NodeT *>> { \
using nodes_iterator = \
df_iterator<NodeRef, df_iterator_default_set<NodeRef>, false, \
GraphTraits<FlatIt<NodeRef>>>; \
static NodeRef getEntryNode(RegionT *R) { \
return R->getBBNode(R->getEntry()); \
} \
static nodes_iterator nodes_begin(RegionT *R) { \
return nodes_iterator::begin(getEntryNode(R)); \
} \
static nodes_iterator nodes_end(RegionT *R) { \
return nodes_iterator::end(getEntryNode(R)); \
} \
}
std::pair< NodeId, LaneBitmask > NodeRef
Definition: RDFLiveness.h:36

Definition at line 290 of file RegionIterator.h.

◆ RegionNodeGraphTraits

#define RegionNodeGraphTraits (   NodeT,
  BlockT,
  RegionT 
)
Value:
template <> struct GraphTraits<NodeT *> { \
using NodeRef = NodeT *; \
using ChildIteratorType = RNSuccIterator<NodeRef, BlockT, RegionT>; \
static NodeRef getEntryNode(NodeRef N) { return N; } \
static inline ChildIteratorType child_begin(NodeRef N) { \
return RNSuccIterator<NodeRef, BlockT, RegionT>(N); \
} \
static inline ChildIteratorType child_end(NodeRef N) { \
return RNSuccIterator<NodeRef, BlockT, RegionT>(N, true); \
} \
}; \
template <> struct GraphTraits<FlatIt<NodeT *>> { \
using NodeRef = NodeT *; \
using ChildIteratorType = \
RNSuccIterator<FlatIt<NodeRef>, BlockT, RegionT>; \
static NodeRef getEntryNode(NodeRef N) { return N; } \
static inline ChildIteratorType child_begin(NodeRef N) { \
return RNSuccIterator<FlatIt<NodeRef>, BlockT, RegionT>(N); \
} \
static inline ChildIteratorType child_end(NodeRef N) { \
return RNSuccIterator<FlatIt<NodeRef>, BlockT, RegionT>(N, true); \
} \
}
#define N

Definition at line 265 of file RegionIterator.h.