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/common-operator.h" | 5 #include "src/compiler/common-operator.h" |
6 #include "src/compiler/graph.h" | 6 #include "src/compiler/graph.h" |
7 #include "src/compiler/loop-peeling.h" | 7 #include "src/compiler/loop-peeling.h" |
8 #include "src/compiler/node.h" | 8 #include "src/compiler/node.h" |
9 #include "src/compiler/node-marker.h" | 9 #include "src/compiler/node-marker.h" |
10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 end = found; | 261 end = found; |
262 } else { | 262 } else { |
263 CHECK_EQ(end, found); // it should be unique! | 263 CHECK_EQ(end, found); // it should be unique! |
264 } | 264 } |
265 } else if (use->opcode() == IrOpcode::kReturn) { | 265 } else if (use->opcode() == IrOpcode::kReturn) { |
266 found = use; | 266 found = use; |
267 rets.push_back(found); | 267 rets.push_back(found); |
268 } | 268 } |
269 } | 269 } |
270 // There should be a merge or a return for each exit. | 270 // There should be a merge or a return for each exit. |
271 CHECK_NE(NULL, found); | 271 CHECK(found); |
272 } | 272 } |
273 // Return nodes, the end merge, and the phis associated with the end merge | 273 // Return nodes, the end merge, and the phis associated with the end merge |
274 // must be duplicated as well. | 274 // must be duplicated as well. |
275 for (Node* node : rets) exits.push_back(node); | 275 for (Node* node : rets) exits.push_back(node); |
276 if (end != NULL) { | 276 if (end != NULL) { |
277 exits.push_back(end); | 277 exits.push_back(end); |
278 for (Node* use : end->uses()) { | 278 for (Node* use : end->uses()) { |
279 if (NodeProperties::IsPhi(use)) exits.push_back(use); | 279 if (NodeProperties::IsPhi(use)) exits.push_back(use); |
280 } | 280 } |
281 } | 281 } |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 } | 330 } |
331 } | 331 } |
332 } | 332 } |
333 | 333 |
334 return iter; | 334 return iter; |
335 } | 335 } |
336 | 336 |
337 } // namespace compiler | 337 } // namespace compiler |
338 } // namespace internal | 338 } // namespace internal |
339 } // namespace v8 | 339 } // namespace v8 |
OLD | NEW |