OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |