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

Side by Side Diff: src/compiler/osr.cc

Issue 2762143002: [turbofan] Remove leftover Type artifacts from OSR. (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | src/compiler/pipeline.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/osr.h" 5 #include "src/compiler/osr.h"
6 #include "src/ast/scopes.h" 6 #include "src/ast/scopes.h"
7 #include "src/compilation-info.h" 7 #include "src/compilation-info.h"
8 #include "src/compiler/all-nodes.h" 8 #include "src/compiler/all-nodes.h"
9 #include "src/compiler/common-operator-reducer.h" 9 #include "src/compiler/common-operator-reducer.h"
10 #include "src/compiler/common-operator.h" 10 #include "src/compiler/common-operator.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 mapping->at(orig->id()) = orig; 100 mapping->at(orig->id()) = orig;
101 continue; 101 continue;
102 } 102 }
103 103
104 // Copy the node. 104 // Copy the node.
105 tmp_inputs.clear(); 105 tmp_inputs.clear();
106 for (Node* input : orig->inputs()) { 106 for (Node* input : orig->inputs()) {
107 tmp_inputs.push_back(mapping->at(input->id())); 107 tmp_inputs.push_back(mapping->at(input->id()));
108 } 108 }
109 copy = graph->NewNode(orig->op(), orig->InputCount(), &tmp_inputs[0]); 109 copy = graph->NewNode(orig->op(), orig->InputCount(), &tmp_inputs[0]);
110 if (NodeProperties::IsTyped(orig)) {
111 NodeProperties::SetType(copy, NodeProperties::GetType(orig));
112 }
113 mapping->at(orig->id()) = copy; 110 mapping->at(orig->id()) = copy;
114 TRACE(" copy #%d:%s -> #%d\n", orig->id(), orig->op()->mnemonic(), 111 TRACE(" copy #%d:%s -> #%d\n", orig->id(), orig->op()->mnemonic(),
115 copy->id()); 112 copy->id());
116 } 113 }
117 114
118 // Fix missing inputs. 115 // Fix missing inputs.
119 for (Node* orig : all.reachable) { 116 for (Node* orig : all.reachable) {
120 Node* copy = mapping->at(orig->id()); 117 Node* copy = mapping->at(orig->id());
121 for (int j = 0; j < copy->InputCount(); j++) { 118 for (int j = 0; j < copy->InputCount(); j++) {
122 if (copy->InputAt(j) == sentinel) { 119 if (copy->InputAt(j) == sentinel) {
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 352
356 void OsrHelper::SetupFrame(Frame* frame) { 353 void OsrHelper::SetupFrame(Frame* frame) {
357 // The optimized frame will subsume the unoptimized frame. Do so by reserving 354 // The optimized frame will subsume the unoptimized frame. Do so by reserving
358 // the first spill slots. 355 // the first spill slots.
359 frame->ReserveSpillSlots(UnoptimizedFrameSlots()); 356 frame->ReserveSpillSlots(UnoptimizedFrameSlots());
360 } 357 }
361 358
362 } // namespace compiler 359 } // namespace compiler
363 } // namespace internal 360 } // namespace internal
364 } // namespace v8 361 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698