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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 protected: | 59 protected: |
60 MachineOperatorBuilder machine_; | 60 MachineOperatorBuilder machine_; |
61 | 61 |
62 MachineOperatorBuilder* machine() { return &machine_; } | 62 MachineOperatorBuilder* machine() { return &machine_; } |
63 | 63 |
64 LoopTree* GetLoopTree() { | 64 LoopTree* GetLoopTree() { |
65 if (FLAG_trace_turbo_graph) { | 65 if (FLAG_trace_turbo_graph) { |
66 OFStream os(stdout); | 66 OFStream os(stdout); |
67 os << AsRPO(*graph()); | 67 os << AsRPO(*graph()); |
68 } | 68 } |
69 Zone zone(isolate()->allocator()); | 69 Zone zone(isolate()->allocator(), ZONE_NAME); |
70 return LoopFinder::BuildLoopTree(graph(), &zone); | 70 return LoopFinder::BuildLoopTree(graph(), &zone); |
71 } | 71 } |
72 | 72 |
73 | 73 |
74 PeeledIteration* PeelOne() { | 74 PeeledIteration* PeelOne() { |
75 LoopTree* loop_tree = GetLoopTree(); | 75 LoopTree* loop_tree = GetLoopTree(); |
76 LoopTree::Loop* loop = loop_tree->outer_loops()[0]; | 76 LoopTree::Loop* loop = loop_tree->outer_loops()[0]; |
77 EXPECT_TRUE(LoopPeeler::CanPeel(loop_tree, loop)); | 77 EXPECT_TRUE(LoopPeeler::CanPeel(loop_tree, loop)); |
78 return Peel(loop_tree, loop); | 78 return Peel(loop_tree, loop); |
79 } | 79 } |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 LoopTree* loop_tree = GetLoopTree(); | 517 LoopTree* loop_tree = GetLoopTree(); |
518 LoopTree::Loop* loop = loop_tree->outer_loops()[0]; | 518 LoopTree::Loop* loop = loop_tree->outer_loops()[0]; |
519 EXPECT_FALSE(LoopPeeler::CanPeel(loop_tree, loop)); | 519 EXPECT_FALSE(LoopPeeler::CanPeel(loop_tree, loop)); |
520 } | 520 } |
521 } | 521 } |
522 | 522 |
523 | 523 |
524 } // namespace compiler | 524 } // namespace compiler |
525 } // namespace internal | 525 } // namespace internal |
526 } // namespace v8 | 526 } // namespace v8 |
OLD | NEW |