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 {
58 RegionNode(const RegionNode &);
60 const RegionNode &operator=(const RegionNode &);
64 /// BasicBlock RegionNode, then entry is just the basic block, that this
65 /// RegionNode represents. Otherwise it is the entry of this (Sub)RegionNode.
71 /// Use one bit to save, if this RegionNode is a subregion or BasicBlock
72 /// RegionNode.
75 /// @brief The parent Region of this RegionNode.
80 /// @brief Create a RegionNode.
82 /// @param Parent The parent of this RegionNode.
83 /// @param Entry The entry BasicBlock of the RegionNode. If this
84 /// RegionNode represents a BasicBlock, this is the
87 /// @param isSubRegion If this RegionNode represents a SubRegion.
88 inline RegionNode(Region* Parent, BasicBlock* Entry, bool isSubRegion = 0)
91 /// @brief Get the parent Region of this RegionNode.
93 /// The parent Region is the Region this RegionNode belongs to. If for
96 /// pointing to the Region this RegionNode belongs to.
98 /// @return Get the parent Region of this RegionNode.
101 /// @brief Get the entry BasicBlock of this RegionNode.
103 /// If this RegionNode represents a BasicBlock this is just the BasicBlock
106 /// @return The entry BasicBlock of this RegionNode.
109 /// @brief Get the content of this RegionNode.
114 /// @return The content of this RegionNode.
118 /// @brief Is this RegionNode a subregion?
127 /// Print a RegionNode.
128 inline raw_ostream &operator<<(raw_ostream &OS, const RegionNode &Node);
131 inline BasicBlock* RegionNode::getNodeAs<BasicBlock>() const {
132 assert(!isSubRegion() && "This is not a BasicBlock RegionNode!");
137 inline Region* RegionNode::getNodeAs<Region>() const {
138 assert(isSubRegion() && "This is not a subregion RegionNode!");
139 return reinterpret_cast<Region*>(const_cast<RegionNode*>(this));
204 class Region : public RegionNode {
216 // (The entry BasicBlock is part of RegionNode)
224 typedef std::map<BasicBlock*, RegionNode*> BBNodeMapT;
259 BasicBlock *getEntry() const { return RegionNode::getEntry(); }
281 Region *getParent() const { return RegionNode::getParent(); }
283 /// @brief Get the RegionNode representing the current Region.
284 /// @return The RegionNode representing the current Region.
285 RegionNode* getNode() const {
286 return const_cast<RegionNode*>(reinterpret_cast<const RegionNode*>(this));
416 /// @brief Get the RegionNode for a BasicBlock
418 /// @param BB The BasicBlock at which the RegionNode should start.
419 /// @return If available, the RegionNode that represents the subregion
420 /// starting at BB. If no subregion starts at BB, the RegionNode
422 RegionNode* getNode(BasicBlock *BB) const;
424 /// @brief Get the BasicBlock RegionNode for a BasicBlock
426 /// @param BB The BasicBlock for which the RegionNode is requested.
427 /// @return The RegionNode representing the BB.
428 RegionNode* getBBNode(BasicBlock *BB) const;
542 typedef df_iterator<RegionNode*, SmallPtrSet<RegionNode*, 8>, false,
543 GraphTraits<RegionNode*> > element_iterator;
545 typedef df_iterator<const RegionNode*, SmallPtrSet<const RegionNode*, 8>,
546 false, GraphTraits<const RegionNode*> >
719 inline raw_ostream &operator<<(raw_ostream &OS, const RegionNode &Node) {