Lines Matching refs:RegionNode

61 /// selected for SubRegions just one RegionNode containing the subregion is
66 /// @brief A RegionNode represents a subregion or a BasicBlock that is part of a
68 class RegionNode {
69 RegionNode(const RegionNode &) LLVM_DELETED_FUNCTION;
70 const RegionNode &operator=(const RegionNode &) LLVM_DELETED_FUNCTION;
74 /// BasicBlock RegionNode, then entry is just the basic block, that this
75 /// RegionNode represents. Otherwise it is the entry of this (Sub)RegionNode.
81 /// Use one bit to save, if this RegionNode is a subregion or BasicBlock
82 /// RegionNode.
85 /// @brief The parent Region of this RegionNode.
90 /// @brief Create a RegionNode.
92 /// @param Parent The parent of this RegionNode.
93 /// @param Entry The entry BasicBlock of the RegionNode. If this
94 /// RegionNode represents a BasicBlock, this is the
97 /// @param isSubRegion If this RegionNode represents a SubRegion.
98 inline RegionNode(Region* Parent, BasicBlock* Entry, bool isSubRegion = 0)
101 /// @brief Get the parent Region of this RegionNode.
103 /// The parent Region is the Region this RegionNode belongs to. If for
106 /// pointing to the Region this RegionNode belongs to.
108 /// @return Get the parent Region of this RegionNode.
111 /// @brief Get the entry BasicBlock of this RegionNode.
113 /// If this RegionNode represents a BasicBlock this is just the BasicBlock
116 /// @return The entry BasicBlock of this RegionNode.
119 /// @brief Get the content of this RegionNode.
124 /// @return The content of this RegionNode.
128 /// @brief Is this RegionNode a subregion?
137 /// Print a RegionNode.
138 inline raw_ostream &operator<<(raw_ostream &OS, const RegionNode &Node);
141 inline BasicBlock* RegionNode::getNodeAs<BasicBlock>() const {
142 assert(!isSubRegion() && "This is not a BasicBlock RegionNode!");
147 inline Region* RegionNode::getNodeAs<Region>() const {
148 assert(isSubRegion() && "This is not a subregion RegionNode!");
149 return reinterpret_cast<Region*>(const_cast<RegionNode*>(this));
214 class Region : public RegionNode {
224 // (The entry BasicBlock is part of RegionNode)
232 typedef std::map<BasicBlock*, RegionNode*> BBNodeMapT;
267 BasicBlock *getEntry() const { return RegionNode::getEntry(); }
307 Region *getParent() const { return RegionNode::getParent(); }
309 /// @brief Get the RegionNode representing the current Region.
310 /// @return The RegionNode representing the current Region.
311 RegionNode* getNode() const {
312 return const_cast<RegionNode*>(reinterpret_cast<const RegionNode*>(this));
442 /// @brief Get the RegionNode for a BasicBlock
444 /// @param BB The BasicBlock at which the RegionNode should start.
445 /// @return If available, the RegionNode that represents the subregion
446 /// starting at BB. If no subregion starts at BB, the RegionNode
448 RegionNode* getNode(BasicBlock *BB) const;
450 /// @brief Get the BasicBlock RegionNode for a BasicBlock
452 /// @param BB The BasicBlock for which the RegionNode is requested.
453 /// @return The RegionNode representing the BB.
454 RegionNode* getBBNode(BasicBlock *BB) const;
581 typedef df_iterator<RegionNode*, SmallPtrSet<RegionNode*, 8>, false,
582 GraphTraits<RegionNode*> > element_iterator;
584 typedef df_iterator<const RegionNode*, SmallPtrSet<const RegionNode*, 8>,
585 false, GraphTraits<const RegionNode*> >
756 inline raw_ostream &operator<<(raw_ostream &OS, const RegionNode &Node) {