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

Side by Side Diff: src/compiler/bytecode-graph-builder.cc

Issue 2851723002: [turbofan] Rip out the unused OsrGuard node. (Closed)
Patch Set: Created 3 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/ast-graph-builder.cc ('k') | src/compiler/common-operator.h » ('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/bytecode-graph-builder.h" 5 #include "src/compiler/bytecode-graph-builder.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/compiler/access-builder.h" 9 #include "src/compiler/access-builder.h"
10 #include "src/compiler/compiler-source-position-table.h" 10 #include "src/compiler/compiler-source-position-table.h"
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 // Create OSR values for each environment value. 311 // Create OSR values for each environment value.
312 SetContext(graph()->NewNode( 312 SetContext(graph()->NewNode(
313 common()->OsrValue(Linkage::kOsrContextSpillSlotIndex), entry)); 313 common()->OsrValue(Linkage::kOsrContextSpillSlotIndex), entry));
314 int size = static_cast<int>(values()->size()); 314 int size = static_cast<int>(values()->size());
315 for (int i = 0; i < size; i++) { 315 for (int i = 0; i < size; i++) {
316 int idx = i; // Indexing scheme follows {StandardFrame}, adapt accordingly. 316 int idx = i; // Indexing scheme follows {StandardFrame}, adapt accordingly.
317 if (i >= register_base()) idx += InterpreterFrameConstants::kExtraSlotCount; 317 if (i >= register_base()) idx += InterpreterFrameConstants::kExtraSlotCount;
318 if (i >= accumulator_base()) idx = Linkage::kOsrAccumulatorRegisterIndex; 318 if (i >= accumulator_base()) idx = Linkage::kOsrAccumulatorRegisterIndex;
319 values()->at(i) = graph()->NewNode(common()->OsrValue(idx), entry); 319 values()->at(i) = graph()->NewNode(common()->OsrValue(idx), entry);
320 } 320 }
321
322 BailoutId loop_id(builder_->bytecode_iterator().current_offset());
323 Node* frame_state =
324 Checkpoint(loop_id, OutputFrameStateCombine::Ignore(), false, nullptr);
325 Node* checkpoint =
326 graph()->NewNode(common()->Checkpoint(), frame_state, entry, entry);
327 UpdateEffectDependency(checkpoint);
328
329 // Create the OSR guard nodes.
330 const Operator* guard_op = common()->OsrGuard(OsrGuardType::kUninitialized);
331 Node* effect = checkpoint;
332 for (int i = 0; i < size; i++) {
333 values()->at(i) = effect =
334 graph()->NewNode(guard_op, values()->at(i), effect, entry);
335 }
336 Node* context = effect = graph()->NewNode(guard_op, Context(), effect, entry);
337 SetContext(context);
338 UpdateEffectDependency(effect);
339 } 321 }
340 322
341 bool BytecodeGraphBuilder::Environment::StateValuesRequireUpdate( 323 bool BytecodeGraphBuilder::Environment::StateValuesRequireUpdate(
342 Node** state_values, Node** values, int count) { 324 Node** state_values, Node** values, int count) {
343 if (*state_values == nullptr) { 325 if (*state_values == nullptr) {
344 return true; 326 return true;
345 } 327 }
346 Node::Inputs inputs = (*state_values)->inputs(); 328 Node::Inputs inputs = (*state_values)->inputs();
347 if (inputs.count() != count) return true; 329 if (inputs.count() != count) return true;
348 for (int i = 0; i < count; i++) { 330 for (int i = 0; i < count; i++) {
(...skipping 2476 matching lines...) Expand 10 before | Expand all | Expand 10 after
2825 it->source_position().ScriptOffset(), start_position_.InliningId())); 2807 it->source_position().ScriptOffset(), start_position_.InliningId()));
2826 it->Advance(); 2808 it->Advance();
2827 } else { 2809 } else {
2828 DCHECK_GT(it->code_offset(), offset); 2810 DCHECK_GT(it->code_offset(), offset);
2829 } 2811 }
2830 } 2812 }
2831 2813
2832 } // namespace compiler 2814 } // namespace compiler
2833 } // namespace internal 2815 } // namespace internal
2834 } // namespace v8 2816 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/common-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698