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

Side by Side Diff: src/compiler/node-properties.cc

Issue 2025573003: [turbofan] Remove eager frame state from call nodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_turbofan-checkpoint-1
Patch Set: Rebased. Created 4 years, 6 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/node-properties.h ('k') | src/compiler/operator-properties.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #include "src/compiler/common-operator.h" 5 #include "src/compiler/common-operator.h"
6 #include "src/compiler/graph.h" 6 #include "src/compiler/graph.h"
7 #include "src/compiler/js-operator.h" 7 #include "src/compiler/js-operator.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 #include "src/compiler/operator-properties.h" 10 #include "src/compiler/operator-properties.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 // static 174 // static
175 void NodeProperties::ReplaceFrameStateInput(Node* node, int index, 175 void NodeProperties::ReplaceFrameStateInput(Node* node, int index,
176 Node* frame_state) { 176 Node* frame_state) {
177 DCHECK_LT(index, OperatorProperties::GetFrameStateInputCount(node->op())); 177 DCHECK_LT(index, OperatorProperties::GetFrameStateInputCount(node->op()));
178 node->ReplaceInput(FirstFrameStateIndex(node) + index, frame_state); 178 node->ReplaceInput(FirstFrameStateIndex(node) + index, frame_state);
179 } 179 }
180 180
181 181
182 // static 182 // static
183 void NodeProperties::RemoveFrameStateInput(Node* node, int index) {
184 DCHECK_LT(index, OperatorProperties::GetFrameStateInputCount(node->op()));
185 node->RemoveInput(FirstFrameStateIndex(node) + index);
186 }
187
188
189 // static
190 void NodeProperties::RemoveNonValueInputs(Node* node) { 183 void NodeProperties::RemoveNonValueInputs(Node* node) {
191 node->TrimInputCount(node->op()->ValueInputCount()); 184 node->TrimInputCount(node->op()->ValueInputCount());
192 } 185 }
193 186
194 187
195 // static 188 // static
196 void NodeProperties::RemoveValueInputs(Node* node) { 189 void NodeProperties::RemoveValueInputs(Node* node) {
197 int value_input_count = node->op()->ValueInputCount(); 190 int value_input_count = node->op()->ValueInputCount();
198 while (--value_input_count >= 0) { 191 while (--value_input_count >= 0) {
199 node->RemoveInput(value_input_count); 192 node->RemoveInput(value_input_count);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 229
237 230
238 // static 231 // static
239 void NodeProperties::ChangeOp(Node* node, const Operator* new_op) { 232 void NodeProperties::ChangeOp(Node* node, const Operator* new_op) {
240 node->set_op(new_op); 233 node->set_op(new_op);
241 Verifier::VerifyNode(node); 234 Verifier::VerifyNode(node);
242 } 235 }
243 236
244 237
245 // static 238 // static
239 Node* NodeProperties::FindFrameStateBefore(Node* node) {
240 Node* effect = NodeProperties::GetEffectInput(node);
241 while (effect->opcode() != IrOpcode::kCheckpoint) {
242 DCHECK_EQ(1, effect->op()->EffectInputCount());
243 effect = NodeProperties::GetEffectInput(effect);
244 }
245 Node* frame_state = GetFrameStateInput(effect, 0);
246 return frame_state;
247 }
248
249 // static
246 Node* NodeProperties::FindProjection(Node* node, size_t projection_index) { 250 Node* NodeProperties::FindProjection(Node* node, size_t projection_index) {
247 for (auto use : node->uses()) { 251 for (auto use : node->uses()) {
248 if (use->opcode() == IrOpcode::kProjection && 252 if (use->opcode() == IrOpcode::kProjection &&
249 ProjectionIndexOf(use->op()) == projection_index) { 253 ProjectionIndexOf(use->op()) == projection_index) {
250 return use; 254 return use;
251 } 255 }
252 } 256 }
253 return nullptr; 257 return nullptr;
254 } 258 }
255 259
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 // static 424 // static
421 bool NodeProperties::IsInputRange(Edge edge, int first, int num) { 425 bool NodeProperties::IsInputRange(Edge edge, int first, int num) {
422 if (num == 0) return false; 426 if (num == 0) return false;
423 int const index = edge.index(); 427 int const index = edge.index();
424 return first <= index && index < first + num; 428 return first <= index && index < first + num;
425 } 429 }
426 430
427 } // namespace compiler 431 } // namespace compiler
428 } // namespace internal 432 } // namespace internal
429 } // namespace v8 433 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/node-properties.h ('k') | src/compiler/operator-properties.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698