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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // This is a return from inside the loop. | 177 // This is a return from inside the loop. |
178 rets.push_back(use); | 178 rets.push_back(use); |
179 } | 179 } |
180 } | 180 } |
181 } | 181 } |
182 } | 182 } |
183 } | 183 } |
184 | 184 |
185 | 185 |
186 bool LoopPeeler::CanPeel(LoopTree* loop_tree, LoopTree::Loop* loop) { | 186 bool LoopPeeler::CanPeel(LoopTree* loop_tree, LoopTree::Loop* loop) { |
187 Zone zone; | 187 Zone zone(loop_tree->zone()->allocator()); |
188 NodeVector exits(&zone); | 188 NodeVector exits(&zone); |
189 NodeVector rets(&zone); | 189 NodeVector rets(&zone); |
190 FindLoopExits(loop_tree, loop, exits, rets); | 190 FindLoopExits(loop_tree, loop, exits, rets); |
191 return exits.size() <= 1u; | 191 return exits.size() <= 1u; |
192 } | 192 } |
193 | 193 |
194 | 194 |
195 PeeledIteration* LoopPeeler::Peel(Graph* graph, CommonOperatorBuilder* common, | 195 PeeledIteration* LoopPeeler::Peel(Graph* graph, CommonOperatorBuilder* common, |
196 LoopTree* loop_tree, LoopTree::Loop* loop, | 196 LoopTree* loop_tree, LoopTree::Loop* loop, |
197 Zone* tmp_zone) { | 197 Zone* tmp_zone) { |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 } | 325 } |
326 } | 326 } |
327 } | 327 } |
328 | 328 |
329 return iter; | 329 return iter; |
330 } | 330 } |
331 | 331 |
332 } // namespace compiler | 332 } // namespace compiler |
333 } // namespace internal | 333 } // namespace internal |
334 } // namespace v8 | 334 } // namespace v8 |
OLD | NEW |