Lines Matching defs:RegionNode

49 /// selected for SubRegions just one RegionNode containing the subregion is
54 /// @brief A RegionNode represents a subregion or a BasicBlock that is part of a
56 class RegionNode {
57 RegionNode(const RegionNode &) LLVM_DELETED_FUNCTION;
58 const RegionNode &operator=(const RegionNode &) LLVM_DELETED_FUNCTION;
62 /// BasicBlock RegionNode, then entry is just the basic block, that this
63 /// RegionNode represents. Otherwise it is the entry of this (Sub)RegionNode.
69 /// Use one bit to save, if this RegionNode is a subregion or BasicBlock
70 /// RegionNode.
73 /// @brief The parent Region of this RegionNode.
78 /// @brief Create a RegionNode.
80 /// @param Parent The parent of this RegionNode.
81 /// @param Entry The entry BasicBlock of the RegionNode. If this
82 /// RegionNode represents a BasicBlock, this is the
85 /// @param isSubRegion If this RegionNode represents a SubRegion.
86 inline RegionNode(Region* Parent, BasicBlock* Entry, bool isSubRegion = 0)
89 /// @brief Get the parent Region of this RegionNode.
91 /// The parent Region is the Region this RegionNode belongs to. If for
94 /// pointing to the Region this RegionNode belongs to.
96 /// @return Get the parent Region of this RegionNode.
99 /// @brief Get the entry BasicBlock of this RegionNode.
101 /// If this RegionNode represents a BasicBlock this is just the BasicBlock
104 /// @return The entry BasicBlock of this RegionNode.
107 /// @brief Get the content of this RegionNode.
112 /// @return The content of this RegionNode.
116 /// @brief Is this RegionNode a subregion?
125 /// Print a RegionNode.
126 inline raw_ostream &operator<<(raw_ostream &OS, const RegionNode &Node);
129 inline BasicBlock* RegionNode::getNodeAs<BasicBlock>() const {
130 assert(!isSubRegion() && "This is not a BasicBlock RegionNode!");
135 inline Region* RegionNode::getNodeAs<Region>() const {
136 assert(isSubRegion() && "This is not a subregion RegionNode!");
137 return reinterpret_cast<Region*>(const_cast<RegionNode*>(this));
202 class Region : public RegionNode {
212 // (The entry BasicBlock is part of RegionNode)
220 typedef std::map<BasicBlock*, RegionNode*> BBNodeMapT;
255 BasicBlock *getEntry() const { return RegionNode::getEntry(); }
295 Region *getParent() const { return RegionNode::getParent(); }
297 /// @brief Get the RegionNode representing the current Region.
298 /// @return The RegionNode representing the current Region.
299 RegionNode* getNode() const {
300 return const_cast<RegionNode*>(reinterpret_cast<const RegionNode*>(this));
430 /// @brief Get the RegionNode for a BasicBlock
432 /// @param BB The BasicBlock at which the RegionNode should start.
433 /// @return If available, the RegionNode that represents the subregion
434 /// starting at BB. If no subregion starts at BB, the RegionNode
436 RegionNode* getNode(BasicBlock *BB) const;
438 /// @brief Get the BasicBlock RegionNode for a BasicBlock
440 /// @param BB The BasicBlock for which the RegionNode is requested.
441 /// @return The RegionNode representing the BB.
442 RegionNode* getBBNode(BasicBlock *BB) const;
556 typedef df_iterator<RegionNode*, SmallPtrSet<RegionNode*, 8>, false,
557 GraphTraits<RegionNode*> > element_iterator;
559 typedef df_iterator<const RegionNode*, SmallPtrSet<const RegionNode*, 8>,
560 false, GraphTraits<const RegionNode*> >
731 inline raw_ostream &operator<<(raw_ostream &OS, const RegionNode &Node) {