| 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/access-builder.h" | 5 #include "src/compiler/access-builder.h" |
| 6 #include "src/compiler/common-operator.h" | 6 #include "src/compiler/common-operator.h" |
| 7 #include "src/compiler/graph.h" | 7 #include "src/compiler/graph.h" |
| 8 #include "src/compiler/graph-visualizer.h" | 8 #include "src/compiler/graph-visualizer.h" |
| 9 #include "src/compiler/js-operator.h" | 9 #include "src/compiler/js-operator.h" |
| 10 #include "src/compiler/node.h" | 10 #include "src/compiler/node.h" |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 | 650 |
| 651 | 651 |
| 652 TEST_F(SchedulerTest, BuildScheduleIfSplit) { | 652 TEST_F(SchedulerTest, BuildScheduleIfSplit) { |
| 653 graph()->SetStart(graph()->NewNode(common()->Start(5))); | 653 graph()->SetStart(graph()->NewNode(common()->Start(5))); |
| 654 | 654 |
| 655 Node* p1 = graph()->NewNode(common()->Parameter(0), graph()->start()); | 655 Node* p1 = graph()->NewNode(common()->Parameter(0), graph()->start()); |
| 656 Node* p2 = graph()->NewNode(common()->Parameter(1), graph()->start()); | 656 Node* p2 = graph()->NewNode(common()->Parameter(1), graph()->start()); |
| 657 Node* p3 = graph()->NewNode(common()->Parameter(2), graph()->start()); | 657 Node* p3 = graph()->NewNode(common()->Parameter(2), graph()->start()); |
| 658 Node* p4 = graph()->NewNode(common()->Parameter(3), graph()->start()); | 658 Node* p4 = graph()->NewNode(common()->Parameter(3), graph()->start()); |
| 659 Node* p5 = graph()->NewNode(common()->Parameter(4), graph()->start()); | 659 Node* p5 = graph()->NewNode(common()->Parameter(4), graph()->start()); |
| 660 Node* cmp = graph()->NewNode(js()->LessThanOrEqual(LanguageMode::SLOPPY), p1, | 660 Node* cmp = |
| 661 p2, p3, p4, graph()->start(), graph()->start()); | 661 graph()->NewNode(js()->LessThanOrEqual(LanguageMode::SLOPPY), p1, p2, p3, |
| 662 p4, p5, graph()->start(), graph()->start()); |
| 662 Node* branch = graph()->NewNode(common()->Branch(), cmp, graph()->start()); | 663 Node* branch = graph()->NewNode(common()->Branch(), cmp, graph()->start()); |
| 663 Node* true_branch = graph()->NewNode(common()->IfTrue(), branch); | 664 Node* true_branch = graph()->NewNode(common()->IfTrue(), branch); |
| 664 Node* false_branch = graph()->NewNode(common()->IfFalse(), branch); | 665 Node* false_branch = graph()->NewNode(common()->IfFalse(), branch); |
| 665 | 666 |
| 666 Node* ret1 = | 667 Node* ret1 = |
| 667 graph()->NewNode(common()->Return(), p4, graph()->start(), true_branch); | 668 graph()->NewNode(common()->Return(), p4, graph()->start(), true_branch); |
| 668 Node* ret2 = | 669 Node* ret2 = |
| 669 graph()->NewNode(common()->Return(), p5, graph()->start(), false_branch); | 670 graph()->NewNode(common()->Return(), p5, graph()->start(), false_branch); |
| 670 Node* merge = graph()->NewNode(common()->Merge(2), ret1, ret2); | 671 Node* merge = graph()->NewNode(common()->Merge(2), ret1, ret2); |
| 671 graph()->SetEnd(graph()->NewNode(common()->End(), merge)); | 672 graph()->SetEnd(graph()->NewNode(common()->End(), merge)); |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1158 | 1159 |
| 1159 Schedule* schedule = ComputeAndVerifySchedule(6); | 1160 Schedule* schedule = ComputeAndVerifySchedule(6); |
| 1160 BasicBlock* block = schedule->block(loop); | 1161 BasicBlock* block = schedule->block(loop); |
| 1161 EXPECT_EQ(block, schedule->block(effect)); | 1162 EXPECT_EQ(block, schedule->block(effect)); |
| 1162 EXPECT_GE(block->rpo_number(), 0); | 1163 EXPECT_GE(block->rpo_number(), 0); |
| 1163 } | 1164 } |
| 1164 | 1165 |
| 1165 } // namespace compiler | 1166 } // namespace compiler |
| 1166 } // namespace internal | 1167 } // namespace internal |
| 1167 } // namespace v8 | 1168 } // namespace v8 |
| OLD | NEW |