OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/control-reducer.h" | 6 #include "src/compiler/control-reducer.h" |
7 #include "src/compiler/graph.h" | 7 #include "src/compiler/graph.h" |
8 #include "src/compiler/graph-reducer.h" | 8 #include "src/compiler/graph-reducer.h" |
9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
10 #include "src/compiler/node-marker.h" | 10 #include "src/compiler/node-marker.h" |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 | 547 |
548 | 548 |
549 namespace { | 549 namespace { |
550 | 550 |
551 class DummyEditor final : public AdvancedReducer::Editor { | 551 class DummyEditor final : public AdvancedReducer::Editor { |
552 public: | 552 public: |
553 void Replace(Node* node, Node* replacement) final { | 553 void Replace(Node* node, Node* replacement) final { |
554 node->ReplaceUses(replacement); | 554 node->ReplaceUses(replacement); |
555 } | 555 } |
556 void Revisit(Node* node) final {} | 556 void Revisit(Node* node) final {} |
| 557 void ReplaceWithValue(Node* node, Node* value, Node* effect, |
| 558 Node* control) final {} |
557 }; | 559 }; |
558 | 560 |
559 } // namespace | 561 } // namespace |
560 | 562 |
561 | 563 |
562 void ControlReducer::TrimGraph(Zone* zone, JSGraph* jsgraph) { | 564 void ControlReducer::TrimGraph(Zone* zone, JSGraph* jsgraph) { |
563 DummyEditor editor; | 565 DummyEditor editor; |
564 ControlReducerImpl impl(&editor, zone, jsgraph); | 566 ControlReducerImpl impl(&editor, zone, jsgraph); |
565 impl.Trim(); | 567 impl.Trim(); |
566 } | 568 } |
(...skipping 27 matching lines...) Expand all Loading... |
594 case IrOpcode::kIfFalse: | 596 case IrOpcode::kIfFalse: |
595 return impl.ReduceIfProjection(node, kFalse); | 597 return impl.ReduceIfProjection(node, kFalse); |
596 default: | 598 default: |
597 return node; | 599 return node; |
598 } | 600 } |
599 } | 601 } |
600 | 602 |
601 } // namespace compiler | 603 } // namespace compiler |
602 } // namespace internal | 604 } // namespace internal |
603 } // namespace v8 | 605 } // namespace v8 |
OLD | NEW |