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

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

Issue 2829093002: [turbofan] Avoid creating singleton state-values for the accumulator. (Closed)
Patch Set: Improve comment Created 3 years, 8 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/bytecode-graph-builder.cc ('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/base/compiler-specific.h" 8 #include "src/base/compiler-specific.h"
9 #include "src/compiler/common-node-cache.h" 9 #include "src/compiler/common-node-cache.h"
10 #include "src/compiler/common-operator.h" 10 #include "src/compiler/common-operator.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 135 }
136 136
137 // Creates a dummy Constant node, used to satisfy calling conventions of 137 // Creates a dummy Constant node, used to satisfy calling conventions of
138 // stubs and runtime functions that do not require a context. 138 // stubs and runtime functions that do not require a context.
139 Node* NoContextConstant() { return ZeroConstant(); } 139 Node* NoContextConstant() { return ZeroConstant(); }
140 140
141 // Creates an empty StateValues node, used when we don't have any concrete 141 // Creates an empty StateValues node, used when we don't have any concrete
142 // values for a certain part of the frame state. 142 // values for a certain part of the frame state.
143 Node* EmptyStateValues(); 143 Node* EmptyStateValues();
144 144
145 // Typed state values with a single dead input. This is useful to represent
146 // dead accumulator.
147 Node* SingleDeadTypedStateValues();
148
145 // Create a control node that serves as dependency for dead nodes. 149 // Create a control node that serves as dependency for dead nodes.
146 Node* Dead(); 150 Node* Dead();
147 151
148 CommonOperatorBuilder* common() const { return common_; } 152 CommonOperatorBuilder* common() const { return common_; }
149 JSOperatorBuilder* javascript() const { return javascript_; } 153 JSOperatorBuilder* javascript() const { return javascript_; }
150 SimplifiedOperatorBuilder* simplified() const { return simplified_; } 154 SimplifiedOperatorBuilder* simplified() const { return simplified_; }
151 MachineOperatorBuilder* machine() const { return machine_; } 155 MachineOperatorBuilder* machine() const { return machine_; }
152 Graph* graph() const { return graph_; } 156 Graph* graph() const { return graph_; }
153 Zone* zone() const { return graph()->zone(); } 157 Zone* zone() const { return graph()->zone(); }
154 Isolate* isolate() const { return isolate_; } 158 Isolate* isolate() const { return isolate_; }
(...skipping 19 matching lines...) Expand all
174 kStaleRegisterConstant, 178 kStaleRegisterConstant,
175 kUndefinedConstant, 179 kUndefinedConstant,
176 kTheHoleConstant, 180 kTheHoleConstant,
177 kTrueConstant, 181 kTrueConstant,
178 kFalseConstant, 182 kFalseConstant,
179 kNullConstant, 183 kNullConstant,
180 kZeroConstant, 184 kZeroConstant,
181 kOneConstant, 185 kOneConstant,
182 kNaNConstant, 186 kNaNConstant,
183 kEmptyStateValues, 187 kEmptyStateValues,
188 kSingleDeadTypedStateValues,
184 kDead, 189 kDead,
185 kNumCachedNodes // Must remain last. 190 kNumCachedNodes // Must remain last.
186 }; 191 };
187 192
188 Isolate* isolate_; 193 Isolate* isolate_;
189 Graph* graph_; 194 Graph* graph_;
190 CommonOperatorBuilder* common_; 195 CommonOperatorBuilder* common_;
191 JSOperatorBuilder* javascript_; 196 JSOperatorBuilder* javascript_;
192 SimplifiedOperatorBuilder* simplified_; 197 SimplifiedOperatorBuilder* simplified_;
193 MachineOperatorBuilder* machine_; 198 MachineOperatorBuilder* machine_;
194 CommonNodeCache cache_; 199 CommonNodeCache cache_;
195 Node* cached_nodes_[kNumCachedNodes]; 200 Node* cached_nodes_[kNumCachedNodes];
196 201
197 Node* NumberConstant(double value); 202 Node* NumberConstant(double value);
198 203
199 DISALLOW_COPY_AND_ASSIGN(JSGraph); 204 DISALLOW_COPY_AND_ASSIGN(JSGraph);
200 }; 205 };
201 206
202 } // namespace compiler 207 } // namespace compiler
203 } // namespace internal 208 } // namespace internal
204 } // namespace v8 209 } // namespace v8
205 210
206 #endif 211 #endif
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/js-graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698