Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Unified Diff: src/compiler/node.h

Issue 768763002: [turbofan] Add TraversalState and GraphTraversal and use them in GraphReducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/compiler/graph.h ('K') | « src/compiler/graph-reducer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/node.h
diff --git a/src/compiler/node.h b/src/compiler/node.h
index 8a442cedbc7aed407eda1e7f88d6388df58cdba3..d7171cff4a5d32001129df4368c8245942e49335 100644
--- a/src/compiler/node.h
+++ b/src/compiler/node.h
@@ -21,6 +21,8 @@ namespace v8 {
namespace internal {
namespace compiler {
+typedef uint32_t TraversalState;
+
class NodeData {
public:
const Operator* op() const { return op_; }
@@ -31,9 +33,13 @@ class NodeData {
return static_cast<IrOpcode::Value>(op_->opcode());
}
+ TraversalState traversal_state() { return traversal_state_; }
+ void set_traversal_state(TraversalState s) { traversal_state_ = s; }
+
protected:
const Operator* op_;
Bounds bounds_;
+ TraversalState traversal_state_;
explicit NodeData(Zone* zone) {}
friend class NodeProperties;
@@ -51,7 +57,10 @@ class Node FINAL : public GenericNode<NodeData, Node> {
Node(GenericGraphBase* graph, int input_count, int reserve_input_count)
: GenericNode<NodeData, Node>(graph, input_count, reserve_input_count) {}
- void Initialize(const Operator* op) { set_op(op); }
+ void Initialize(const Operator* op) {
+ set_op(op);
+ set_traversal_state(0);
+ }
bool IsDead() const { return InputCount() > 0 && InputAt(0) == NULL; }
void Kill();
« src/compiler/graph.h ('K') | « src/compiler/graph-reducer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698