summaryrefslogtreecommitdiff
path: root/chromium/v8/src/compiler/all-nodes.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-01-04 14:17:57 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-01-05 10:05:06 +0000
commit39d357e3248f80abea0159765ff39554affb40db (patch)
treeaba0e6bfb76de0244bba0f5fdbd64b830dd6e621 /chromium/v8/src/compiler/all-nodes.h
parent87778abf5a1f89266f37d1321b92a21851d8244d (diff)
downloadqtwebengine-chromium-39d357e3248f80abea0159765ff39554affb40db.tar.gz
BASELINE: Update Chromium to 55.0.2883.105
And updates ninja to 1.7.2 Change-Id: I20d43c737f82764d857ada9a55586901b18b9243 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/v8/src/compiler/all-nodes.h')
-rw-r--r--chromium/v8/src/compiler/all-nodes.h26
1 files changed, 20 insertions, 6 deletions
diff --git a/chromium/v8/src/compiler/all-nodes.h b/chromium/v8/src/compiler/all-nodes.h
index 700f0071b1e..7c70bf75f68 100644
--- a/chromium/v8/src/compiler/all-nodes.h
+++ b/chromium/v8/src/compiler/all-nodes.h
@@ -6,7 +6,7 @@
#define V8_COMPILER_ALL_NODES_H_
#include "src/compiler/node.h"
-#include "src/zone-containers.h"
+#include "src/zone/zone-containers.h"
namespace v8 {
namespace internal {
@@ -16,19 +16,33 @@ namespace compiler {
// from end.
class AllNodes {
public:
- // Constructor. Traverses the graph and builds the {live} sets.
- AllNodes(Zone* local_zone, const Graph* graph);
+ // Constructor. Traverses the graph and builds the {reachable} set of nodes
+ // reachable from {end}. When {only_inputs} is true, find the nodes
+ // reachable through input edges; these are all live nodes.
+ AllNodes(Zone* local_zone, Node* end, const Graph* graph,
+ bool only_inputs = true);
+ // Constructor. Traverses the graph and builds the {reachable} set of nodes
+ // reachable from the End node.
+ AllNodes(Zone* local_zone, const Graph* graph, bool only_inputs = true);
bool IsLive(Node* node) {
+ CHECK(only_inputs_);
+ return IsReachable(node);
+ }
+
+ bool IsReachable(Node* node) {
if (!node) return false;
size_t id = node->id();
- return id < is_live.size() && is_live[id];
+ return id < is_reachable_.size() && is_reachable_[id];
}
- NodeVector live; // Nodes reachable from end.
+ NodeVector reachable; // Nodes reachable from end.
private:
- BoolVector is_live;
+ void Mark(Zone* local_zone, Node* end, const Graph* graph);
+
+ BoolVector is_reachable_;
+ const bool only_inputs_;
};
} // namespace compiler