LLVM  8.0.1
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 "llvm/IR/CFG.h"
#include <cassert>
#include <iterator>
#include <type_traits>
Include dependency graph for RegionIterator.h:
This graph shows which files directly or indirectly include this file:

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

 llvm
 This class represents lattice values for constants.
 

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)); \
} \
}
const_iterator end(StringRef path)
Get end iterator over path.
Definition: Path.cpp:259
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
Definition: Path.cpp:250

Definition at line 284 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 259 of file RegionIterator.h.