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

Unified Diff: src/compiler/osr.cc

Issue 921083004: [turbofan] Rename context stack as part of the environment for OSR. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | « src/compiler/ast-graph-builder.cc ('k') | test/mjsunit/compiler/osr-block-scope.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/osr.cc
diff --git a/src/compiler/osr.cc b/src/compiler/osr.cc
index b0592c9d4ccbe3086740a1d8fb434930cdd327e0..32485823646901bf41000d69b3d71a0011d0de41 100644
--- a/src/compiler/osr.cc
+++ b/src/compiler/osr.cc
@@ -48,10 +48,6 @@ static void PeelOuterLoopsForOsr(Graph* graph, CommonOperatorBuilder* common,
// Prepare the mapping for OSR values and the OSR loop entry.
mapping->at(osr_normal_entry->id()) = dead;
mapping->at(osr_loop_entry->id()) = dead;
- // Don't duplicate the OSR values.
- for (Node* use : osr_loop_entry->uses()) {
- if (use->opcode() == IrOpcode::kOsrValue) mapping->at(use->id()) = use;
- }
// The outer loops are dead in this copy.
for (LoopTree::Loop* outer = loop->parent(); outer;
@@ -69,8 +65,9 @@ static void PeelOuterLoopsForOsr(Graph* graph, CommonOperatorBuilder* common,
// Mapping already exists.
continue;
}
- if (orig->InputCount() == 0) {
- // No need to copy leaf nodes.
+ if (orig->InputCount() == 0 || orig->opcode() == IrOpcode::kParameter ||
+ orig->opcode() == IrOpcode::kOsrValue) {
+ // No need to copy leaf nodes or parameters.
mapping->at(orig->id()) = orig;
continue;
}
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | test/mjsunit/compiler/osr-block-scope.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698