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

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

Issue 1022783002: [turbofan] Remove last_use_ field from Node. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months 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
« no previous file with comments | « no previous file | src/compiler/node.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "src/compiler/opcodes.h" 8 #include "src/compiler/opcodes.h"
9 #include "src/compiler/operator.h" 9 #include "src/compiler/operator.h"
10 #include "src/types-inl.h" 10 #include "src/types-inl.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 int InputCount() const { return input_count(); } 60 int InputCount() const { return input_count(); }
61 Node* InputAt(int index) const { return GetInputRecordPtr(index)->to; } 61 Node* InputAt(int index) const { return GetInputRecordPtr(index)->to; }
62 inline void ReplaceInput(int index, Node* new_to); 62 inline void ReplaceInput(int index, Node* new_to);
63 void AppendInput(Zone* zone, Node* new_to); 63 void AppendInput(Zone* zone, Node* new_to);
64 void InsertInput(Zone* zone, int index, Node* new_to); 64 void InsertInput(Zone* zone, int index, Node* new_to);
65 void RemoveInput(int index); 65 void RemoveInput(int index);
66 void RemoveAllInputs(); 66 void RemoveAllInputs();
67 void TrimInputCount(int new_input_count); 67 void TrimInputCount(int new_input_count);
68 68
69 int UseCount() const; 69 int UseCount() const;
70 Node* UseAt(int index) const;
71 void ReplaceUses(Node* replace_to); 70 void ReplaceUses(Node* replace_to);
72 71
73 class InputEdges FINAL { 72 class InputEdges FINAL {
74 public: 73 public:
75 typedef Edge value_type; 74 typedef Edge value_type;
76 75
77 class iterator; 76 class iterator;
78 inline iterator begin() const; 77 inline iterator begin() const;
79 inline iterator end() const; 78 inline iterator end() const;
80 79
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 typedef BitField<unsigned, 29, 2> ReservedInputCountField; 218 typedef BitField<unsigned, 29, 2> ReservedInputCountField;
220 typedef BitField<unsigned, 31, 1> HasAppendableInputsField; 219 typedef BitField<unsigned, 31, 1> HasAppendableInputsField;
221 static const int kDefaultReservedInputs = ReservedInputCountField::kMax; 220 static const int kDefaultReservedInputs = ReservedInputCountField::kMax;
222 221
223 const Operator* op_; 222 const Operator* op_;
224 Bounds bounds_; 223 Bounds bounds_;
225 Mark mark_; 224 Mark mark_;
226 NodeId const id_; 225 NodeId const id_;
227 unsigned bit_field_; 226 unsigned bit_field_;
228 Use* first_use_; 227 Use* first_use_;
229 Use* last_use_;
230 union { 228 union {
231 // When a node is initially allocated, it uses a static buffer to hold its 229 // When a node is initially allocated, it uses a static buffer to hold its
232 // inputs under the assumption that the number of outputs will not increase. 230 // inputs under the assumption that the number of outputs will not increase.
233 // When the first input is appended, the static buffer is converted into a 231 // When the first input is appended, the static buffer is converted into a
234 // deque to allow for space-efficient growing. 232 // deque to allow for space-efficient growing.
235 Input static_[1]; 233 Input static_[1];
236 InputDeque* appendable_; 234 InputDeque* appendable_;
237 } inputs_; 235 } inputs_;
238 236
239 friend class Edge; 237 friend class Edge;
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 476
479 void Node::ReplaceInput(int index, Node* new_to) { 477 void Node::ReplaceInput(int index, Node* new_to) {
480 GetInputRecordPtr(index)->Update(new_to); 478 GetInputRecordPtr(index)->Update(new_to);
481 } 479 }
482 480
483 } // namespace compiler 481 } // namespace compiler
484 } // namespace internal 482 } // namespace internal
485 } // namespace v8 483 } // namespace v8
486 484
487 #endif // V8_COMPILER_NODE_H_ 485 #endif // V8_COMPILER_NODE_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698