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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 2851723002: [turbofan] Rip out the unused OsrGuard node. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/bytecode-graph-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 88fbd8175eab424dbf805fc4a4c6c8b40f5d708f..e9628036398b1c19559e5c33c736e591347f0a10 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -3016,8 +3016,9 @@ void AstGraphBuilder::Environment::PrepareForOsrEntry() {
// Set the control and effect to the OSR loop entry.
Node* osr_loop_entry = graph->NewNode(builder_->common()->OsrLoopEntry(),
graph->start(), graph->start());
+ Node* effect = osr_loop_entry;
UpdateControlDependency(osr_loop_entry);
- UpdateEffectDependency(osr_loop_entry);
+ UpdateEffectDependency(effect);
// Set OSR values.
for (int i = 0; i < size; ++i) {
@@ -3030,30 +3031,11 @@ void AstGraphBuilder::Environment::PrepareForOsrEntry() {
builder_->common()->OsrValue(Linkage::kOsrContextSpillSlotIndex);
contexts()->back() = graph->NewNode(op_inner, osr_loop_entry);
- // Create a checkpoint.
- Node* frame_state = Checkpoint(builder_->info()->osr_ast_id());
- Node* checkpoint = graph->NewNode(common()->Checkpoint(), frame_state,
- osr_loop_entry, osr_loop_entry);
- UpdateEffectDependency(checkpoint);
-
- // Create the OSR guard nodes.
- const Operator* guard_op =
- builder_->info()->is_deoptimization_enabled()
- ? builder_->common()->OsrGuard(OsrGuardType::kUninitialized)
- : builder_->common()->OsrGuard(OsrGuardType::kAny);
- Node* effect = checkpoint;
- for (int i = 0; i < size; ++i) {
- values()->at(i) = effect =
- graph->NewNode(guard_op, values()->at(i), effect, osr_loop_entry);
- }
- contexts()->back() = effect =
- graph->NewNode(guard_op, contexts()->back(), effect, osr_loop_entry);
-
// The innermost context is the OSR value, and the outer contexts are
// reconstructed by dynamically walking up the context chain.
const Operator* load_op =
builder_->javascript()->LoadContext(0, Context::PREVIOUS_INDEX, true);
- Node* osr_context = effect = contexts()->back();
+ Node* osr_context = contexts()->back();
int last = static_cast<int>(contexts()->size() - 1);
for (int i = last - 1; i >= 0; i--) {
osr_context = effect = graph->NewNode(load_op, osr_context, effect);
« no previous file with comments | « no previous file | src/compiler/bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698