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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 } else { | 304 } else { |
305 // don't do anything for control edges. | 305 // don't do anything for control edges. |
306 // TODO(titzer): should update control edges to peeled? | 306 // TODO(titzer): should update control edges to peeled? |
307 } | 307 } |
308 } | 308 } |
309 } | 309 } |
310 | 310 |
311 // Update all the value and effect edges at once. | 311 // Update all the value and effect edges at once. |
312 if (!value_edges.empty()) { | 312 if (!value_edges.empty()) { |
313 // TODO(titzer): machine type is wrong here. | 313 // TODO(titzer): machine type is wrong here. |
314 Node* phi = graph->NewNode(common->Phi(kMachAnyTagged, 2), node, | 314 Node* phi = |
315 peeling.map(node), merge); | 315 graph->NewNode(common->Phi(MachineRepresentation::kTagged, 2), node, |
| 316 peeling.map(node), merge); |
316 for (Edge edge : value_edges) edge.UpdateTo(phi); | 317 for (Edge edge : value_edges) edge.UpdateTo(phi); |
317 value_edges.clear(); | 318 value_edges.clear(); |
318 } | 319 } |
319 if (!effect_edges.empty()) { | 320 if (!effect_edges.empty()) { |
320 Node* effect_phi = graph->NewNode(common->EffectPhi(2), node, | 321 Node* effect_phi = graph->NewNode(common->EffectPhi(2), node, |
321 peeling.map(node), merge); | 322 peeling.map(node), merge); |
322 for (Edge edge : effect_edges) edge.UpdateTo(effect_phi); | 323 for (Edge edge : effect_edges) edge.UpdateTo(effect_phi); |
323 effect_edges.clear(); | 324 effect_edges.clear(); |
324 } | 325 } |
325 } | 326 } |
326 } | 327 } |
327 | 328 |
328 return iter; | 329 return iter; |
329 } | 330 } |
330 | 331 |
331 } // namespace compiler | 332 } // namespace compiler |
332 } // namespace internal | 333 } // namespace internal |
333 } // namespace v8 | 334 } // namespace v8 |
OLD | NEW |