| 54 | } |
| 55 | |
| 56 | bool NodeView::HasFanout(const FaninView& fanout) const { |
| 57 | if (fanout.index() < Graph::kControlSlot || |
| 58 | graph_view_ != fanout.graph_view_) { |
| 59 | return false; |
| 60 | } |
| 61 | NodeView* view = fanout.node_view(); |
| 62 | if (view == nullptr) { |
| 63 | return false; |
| 64 | } else if (fanout.index() == Graph::kControlSlot) { |
| 65 | return view->fanins_set_.contains({this->node(), Graph::kControlSlot}); |
| 66 | } else if (fanout.index() >= view->regular_fanins_.size()) { |
| 67 | return false; |
| 68 | } |
| 69 | return view->regular_fanins_[fanout.index()].node_index_ == node_index_; |
| 70 | } |
| 71 | |
| 72 | inline const FanoutView& NodeView::GetMissingFanin() const { |
| 73 | return graph_view_->missing_fanin_; |