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/graph.h" | 6 #include "src/compiler/graph.h" |
7 #include "src/compiler/graph-visualizer.h" | 7 #include "src/compiler/graph-visualizer.h" |
8 #include "src/compiler/js-graph.h" | 8 #include "src/compiler/js-graph.h" |
9 #include "src/compiler/loop-peeling.h" | 9 #include "src/compiler/loop-peeling.h" |
10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 protected: | 57 protected: |
58 MachineOperatorBuilder machine_; | 58 MachineOperatorBuilder machine_; |
59 | 59 |
60 MachineOperatorBuilder* machine() { return &machine_; } | 60 MachineOperatorBuilder* machine() { return &machine_; } |
61 | 61 |
62 LoopTree* GetLoopTree() { | 62 LoopTree* GetLoopTree() { |
63 if (FLAG_trace_turbo_graph) { | 63 if (FLAG_trace_turbo_graph) { |
64 OFStream os(stdout); | 64 OFStream os(stdout); |
65 os << AsRPO(*graph()); | 65 os << AsRPO(*graph()); |
66 } | 66 } |
67 Zone zone; | 67 Zone zone(isolate()->allocator()); |
68 return LoopFinder::BuildLoopTree(graph(), &zone); | 68 return LoopFinder::BuildLoopTree(graph(), &zone); |
69 } | 69 } |
70 | 70 |
71 | 71 |
72 PeeledIteration* PeelOne() { | 72 PeeledIteration* PeelOne() { |
73 LoopTree* loop_tree = GetLoopTree(); | 73 LoopTree* loop_tree = GetLoopTree(); |
74 LoopTree::Loop* loop = loop_tree->outer_loops()[0]; | 74 LoopTree::Loop* loop = loop_tree->outer_loops()[0]; |
75 EXPECT_TRUE(LoopPeeler::CanPeel(loop_tree, loop)); | 75 EXPECT_TRUE(LoopPeeler::CanPeel(loop_tree, loop)); |
76 return Peel(loop_tree, loop); | 76 return Peel(loop_tree, loop); |
77 } | 77 } |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 LoopTree* loop_tree = GetLoopTree(); | 491 LoopTree* loop_tree = GetLoopTree(); |
492 LoopTree::Loop* loop = loop_tree->outer_loops()[0]; | 492 LoopTree::Loop* loop = loop_tree->outer_loops()[0]; |
493 EXPECT_FALSE(LoopPeeler::CanPeel(loop_tree, loop)); | 493 EXPECT_FALSE(LoopPeeler::CanPeel(loop_tree, loop)); |
494 } | 494 } |
495 } | 495 } |
496 | 496 |
497 | 497 |
498 } // namespace compiler | 498 } // namespace compiler |
499 } // namespace internal | 499 } // namespace internal |
500 } // namespace v8 | 500 } // namespace v8 |
OLD | NEW |