| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 PeeledIteration* peeled = | 83 PeeledIteration* peeled = |
| 84 LoopPeeler::Peel(graph(), common(), loop_tree, loop, zone()); | 84 LoopPeeler::Peel(graph(), common(), loop_tree, loop, zone()); |
| 85 if (FLAG_trace_turbo_graph) { | 85 if (FLAG_trace_turbo_graph) { |
| 86 OFStream os(stdout); | 86 OFStream os(stdout); |
| 87 os << AsRPO(*graph()); | 87 os << AsRPO(*graph()); |
| 88 } | 88 } |
| 89 return peeled; | 89 return peeled; |
| 90 } | 90 } |
| 91 | 91 |
| 92 Node* InsertReturn(Node* val, Node* effect, Node* control) { | 92 Node* InsertReturn(Node* val, Node* effect, Node* control) { |
| 93 Node* zero = graph()->NewNode(common()->Int32Constant(0)); | 93 Node* r = graph()->NewNode(common()->Return(), val, effect, control); |
| 94 Node* r = graph()->NewNode(common()->Return(), zero, val, effect, control); | |
| 95 graph()->SetEnd(r); | 94 graph()->SetEnd(r); |
| 96 return r; | 95 return r; |
| 97 } | 96 } |
| 98 | 97 |
| 99 Node* ExpectPeeled(Node* node, PeeledIteration* iter) { | 98 Node* ExpectPeeled(Node* node, PeeledIteration* iter) { |
| 100 Node* p = iter->map(node); | 99 Node* p = iter->map(node); |
| 101 EXPECT_NE(node, p); | 100 EXPECT_NE(node, p); |
| 102 return p; | 101 return p; |
| 103 } | 102 } |
| 104 | 103 |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 LoopTree* loop_tree = GetLoopTree(); | 517 LoopTree* loop_tree = GetLoopTree(); |
| 519 LoopTree::Loop* loop = loop_tree->outer_loops()[0]; | 518 LoopTree::Loop* loop = loop_tree->outer_loops()[0]; |
| 520 EXPECT_FALSE(LoopPeeler::CanPeel(loop_tree, loop)); | 519 EXPECT_FALSE(LoopPeeler::CanPeel(loop_tree, loop)); |
| 521 } | 520 } |
| 522 } | 521 } |
| 523 | 522 |
| 524 | 523 |
| 525 } // namespace compiler | 524 } // namespace compiler |
| 526 } // namespace internal | 525 } // namespace internal |
| 527 } // namespace v8 | 526 } // namespace v8 |
| OLD | NEW |