| Index: src/compiler/osr.cc
|
| diff --git a/src/compiler/osr.cc b/src/compiler/osr.cc
|
| index 2eccf302f50212f49d44eebd8d27c32193a4aa25..10b973a00e4bf923ec6502e9280c49fa21150297 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;
|
| }
|
|
|