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

Side by Side Diff: src/compiler/js-graph.h

Issue 2006353003: [turbofan] Avoid unnecessary copying of nodes during inlining. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Don't use one EmptyFrameState cross functions, that gets mutated during inlining. Created 4 years, 7 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 | « src/compiler/graph.h ('k') | src/compiler/js-graph.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_JS_GRAPH_H_ 5 #ifndef V8_COMPILER_JS_GRAPH_H_
6 #define V8_COMPILER_JS_GRAPH_H_ 6 #define V8_COMPILER_JS_GRAPH_H_
7 7
8 #include "src/compiler/common-node-cache.h" 8 #include "src/compiler/common-node-cache.h"
9 #include "src/compiler/common-operator.h" 9 #include "src/compiler/common-operator.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 120 }
121 121
122 // Creates a dummy Constant node, used to satisfy calling conventions of 122 // Creates a dummy Constant node, used to satisfy calling conventions of
123 // stubs and runtime functions that do not require a context. 123 // stubs and runtime functions that do not require a context.
124 Node* NoContextConstant() { return ZeroConstant(); } 124 Node* NoContextConstant() { return ZeroConstant(); }
125 125
126 // Creates an empty frame states for cases where we know that a function 126 // Creates an empty frame states for cases where we know that a function
127 // cannot deopt. 127 // cannot deopt.
128 Node* EmptyFrameState(); 128 Node* EmptyFrameState();
129 129
130 // Creates an empty StateValues node, used when we don't have any concrete
131 // values for a certain part of the frame state.
132 Node* EmptyStateValues();
133
130 // Create a control node that serves as dependency for dead nodes. 134 // Create a control node that serves as dependency for dead nodes.
131 Node* Dead(); 135 Node* Dead();
132 136
133 CommonOperatorBuilder* common() const { return common_; } 137 CommonOperatorBuilder* common() const { return common_; }
134 JSOperatorBuilder* javascript() const { return javascript_; } 138 JSOperatorBuilder* javascript() const { return javascript_; }
135 SimplifiedOperatorBuilder* simplified() const { return simplified_; } 139 SimplifiedOperatorBuilder* simplified() const { return simplified_; }
136 MachineOperatorBuilder* machine() const { return machine_; } 140 MachineOperatorBuilder* machine() const { return machine_; }
137 Graph* graph() const { return graph_; } 141 Graph* graph() const { return graph_; }
138 Zone* zone() const { return graph()->zone(); } 142 Zone* zone() const { return graph()->zone(); }
139 Isolate* isolate() const { return isolate_; } 143 Isolate* isolate() const { return isolate_; }
(...skipping 12 matching lines...) Expand all
152 kStaleRegisterConstant, 156 kStaleRegisterConstant,
153 kUndefinedConstant, 157 kUndefinedConstant,
154 kTheHoleConstant, 158 kTheHoleConstant,
155 kTrueConstant, 159 kTrueConstant,
156 kFalseConstant, 160 kFalseConstant,
157 kNullConstant, 161 kNullConstant,
158 kZeroConstant, 162 kZeroConstant,
159 kOneConstant, 163 kOneConstant,
160 kNaNConstant, 164 kNaNConstant,
161 kEmptyFrameState, 165 kEmptyFrameState,
166 kEmptyStateValues,
162 kDead, 167 kDead,
163 kNumCachedNodes // Must remain last. 168 kNumCachedNodes // Must remain last.
164 }; 169 };
165 170
166 Isolate* isolate_; 171 Isolate* isolate_;
167 Graph* graph_; 172 Graph* graph_;
168 CommonOperatorBuilder* common_; 173 CommonOperatorBuilder* common_;
169 JSOperatorBuilder* javascript_; 174 JSOperatorBuilder* javascript_;
170 SimplifiedOperatorBuilder* simplified_; 175 SimplifiedOperatorBuilder* simplified_;
171 MachineOperatorBuilder* machine_; 176 MachineOperatorBuilder* machine_;
172 CommonNodeCache cache_; 177 CommonNodeCache cache_;
173 Node* cached_nodes_[kNumCachedNodes]; 178 Node* cached_nodes_[kNumCachedNodes];
174 179
175 Node* NumberConstant(double value); 180 Node* NumberConstant(double value);
176 181
177 DISALLOW_COPY_AND_ASSIGN(JSGraph); 182 DISALLOW_COPY_AND_ASSIGN(JSGraph);
178 }; 183 };
179 184
180 } // namespace compiler 185 } // namespace compiler
181 } // namespace internal 186 } // namespace internal
182 } // namespace v8 187 } // namespace v8
183 188
184 #endif 189 #endif
OLDNEW
« no previous file with comments | « src/compiler/graph.h ('k') | src/compiler/js-graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698