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

Side by Side Diff: src/compiler/instruction-scheduler.cc

Issue 2376963002: [turbofan] Relax dependencies due to deopt during instruction scheduling. (Closed)
Patch Set: fix formatting (git cl format) Created 4 years, 2 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/instruction-scheduler.h ('k') | src/compiler/x64/instruction-scheduler-x64.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 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/instruction-scheduler.h" 5 #include "src/compiler/instruction-scheduler.h"
6 6
7 #include "src/base/adapters.h" 7 #include "src/base/adapters.h"
8 #include "src/base/utils/random-number-generator.h" 8 #include "src/base/utils/random-number-generator.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 } else if (IsFixedRegisterParameter(instr)) { 129 } else if (IsFixedRegisterParameter(instr)) {
130 if (last_live_in_reg_marker_ != nullptr) { 130 if (last_live_in_reg_marker_ != nullptr) {
131 last_live_in_reg_marker_->AddSuccessor(new_node); 131 last_live_in_reg_marker_->AddSuccessor(new_node);
132 } 132 }
133 last_live_in_reg_marker_ = new_node; 133 last_live_in_reg_marker_ = new_node;
134 } else { 134 } else {
135 if (last_live_in_reg_marker_ != nullptr) { 135 if (last_live_in_reg_marker_ != nullptr) {
136 last_live_in_reg_marker_->AddSuccessor(new_node); 136 last_live_in_reg_marker_->AddSuccessor(new_node);
137 } 137 }
138 138
139 // Make sure that new instructions are not scheduled before the last 139 // Make sure that instructions are not scheduled before the last
140 // deoptimization point. 140 // deoptimization point when they depend on it.
141 if (last_deopt_ != nullptr) { 141 if ((last_deopt_ != nullptr) && DependsOnDeoptimization(instr)) {
142 last_deopt_->AddSuccessor(new_node); 142 last_deopt_->AddSuccessor(new_node);
143 } 143 }
144 144
145 // Instructions with side effects and memory operations can't be 145 // Instructions with side effects and memory operations can't be
146 // reordered with respect to each other. 146 // reordered with respect to each other.
147 if (HasSideEffect(instr)) { 147 if (HasSideEffect(instr)) {
148 if (last_side_effect_instr_ != nullptr) { 148 if (last_side_effect_instr_ != nullptr) {
149 last_side_effect_instr_->AddSuccessor(new_node); 149 last_side_effect_instr_->AddSuccessor(new_node);
150 } 150 }
151 for (ScheduleGraphNode* load : pending_loads_) { 151 for (ScheduleGraphNode* load : pending_loads_) {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 } 355 }
356 } 356 }
357 357
358 node->set_total_latency(max_latency + node->latency()); 358 node->set_total_latency(max_latency + node->latency());
359 } 359 }
360 } 360 }
361 361
362 } // namespace compiler 362 } // namespace compiler
363 } // namespace internal 363 } // namespace internal
364 } // namespace v8 364 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-scheduler.h ('k') | src/compiler/x64/instruction-scheduler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698