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

Unified Diff: src/compiler/node.h

Issue 855723002: Revert of Revert of [turbofan] Improve memory layout of Node class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/node.cc » ('j') | 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 f8b3329d039216dc46cad97a8f114e11813d47e3..ed9c01db90d668dcb9505db9b9661814c68bf215 100644
--- a/src/compiler/node.h
+++ b/src/compiler/node.h
@@ -168,12 +168,13 @@
inline void EnsureAppendableInputs(Zone* zone);
- Input* GetInputRecordPtr(int index) const {
- if (has_appendable_inputs()) {
- return &((*inputs_.appendable_)[index]);
- } else {
- return &inputs_.static_[index];
- }
+ Input* GetInputRecordPtr(int index) {
+ return has_appendable_inputs() ? &((*inputs_.appendable_)[index])
+ : &inputs_.static_[index];
+ }
+ const Input* GetInputRecordPtr(int index) const {
+ return has_appendable_inputs() ? &((*inputs_.appendable_)[index])
+ : &inputs_.static_[index];
}
inline void AppendUse(Use* const use);
@@ -224,16 +225,16 @@
Mark mark_;
NodeId const id_;
unsigned bit_field_;
+ Use* first_use_;
+ Use* last_use_;
union {
// When a node is initially allocated, it uses a static buffer to hold its
// inputs under the assumption that the number of outputs will not increase.
// When the first input is appended, the static buffer is converted into a
// deque to allow for space-efficient growing.
- Input* static_;
+ Input static_[1];
InputDeque* appendable_;
} inputs_;
- Use* first_use_;
- Use* last_use_;
friend class Edge;
friend class NodeMarkerBase;
« 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