1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef V8_COMPILER_ALL_NODES_H_
6 #define V8_COMPILER_ALL_NODES_H_
8 #include "src/compiler/node.h"
9 #include "src/zone-containers.h"
15 // A helper utility that traverses the graph and gathers all nodes reachable
19 // Constructor. Traverses the graph and builds the {live} sets.
20 AllNodes(Zone* local_zone, const Graph* graph);
22 bool IsLive(Node* node) {
23 if (!node) return false;
24 size_t id = node->id();
25 return id < is_live.size() && is_live[id];
28 NodeVector live; // Nodes reachable from end.
34 } // namespace compiler
35 } // namespace internal
38 #endif // V8_COMPILER_ALL_NODES_H_