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

Side by Side Diff: src/compiler/node.h

Issue 644083003: [turbofan] Reduce memory consumption of graph building (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add missing arraysize 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_NODE_H_ 5 #ifndef V8_COMPILER_NODE_H_
6 #define V8_COMPILER_NODE_H_ 6 #define V8_COMPILER_NODE_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 30 matching lines...) Expand all
41 void set_bounds(Bounds b) { bounds_ = b; } 41 void set_bounds(Bounds b) { bounds_ = b; }
42 }; 42 };
43 43
44 // A Node is the basic primitive of an IR graph. In addition to the members 44 // A Node is the basic primitive of an IR graph. In addition to the members
45 // inherited from Vector, Nodes only contain a mutable Operator that may change 45 // inherited from Vector, Nodes only contain a mutable Operator that may change
46 // during compilation, e.g. during lowering passes. Other information that 46 // during compilation, e.g. during lowering passes. Other information that
47 // needs to be associated with Nodes during compilation must be stored 47 // needs to be associated with Nodes during compilation must be stored
48 // out-of-line indexed by the Node's id. 48 // out-of-line indexed by the Node's id.
49 class Node FINAL : public GenericNode<NodeData, Node> { 49 class Node FINAL : public GenericNode<NodeData, Node> {
50 public: 50 public:
51 Node(GenericGraphBase* graph, int input_count) 51 Node(GenericGraphBase* graph, int input_count, int reserve_input_count)
52 : GenericNode<NodeData, Node>(graph, input_count) {} 52 : GenericNode<NodeData, Node>(graph, input_count, reserve_input_count) {}
53 53
54 void Initialize(const Operator* op) { set_op(op); } 54 void Initialize(const Operator* op) { set_op(op); }
55 55
56 bool IsDead() const { return InputCount() > 0 && InputAt(0) == NULL; } 56 bool IsDead() const { return InputCount() > 0 && InputAt(0) == NULL; }
57 void Kill(); 57 void Kill();
58 58
59 void CollectProjections(ZoneVector<Node*>* projections); 59 void CollectProjections(ZoneVector<Node*>* projections);
60 Node* FindProjection(size_t projection_index); 60 Node* FindProjection(size_t projection_index);
61 }; 61 };
62 62
(...skipping 21 matching lines...) Expand all
84 template <typename T> 84 template <typename T>
85 static inline const T& OpParameter(const Node* node) { 85 static inline const T& OpParameter(const Node* node) {
86 return OpParameter<T>(node->op()); 86 return OpParameter<T>(node->op());
87 } 87 }
88 88
89 } // namespace compiler 89 } // namespace compiler
90 } // namespace internal 90 } // namespace internal
91 } // namespace v8 91 } // namespace v8
92 92
93 #endif // V8_COMPILER_NODE_H_ 93 #endif // V8_COMPILER_NODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698