| Index: test/cctest/compiler/test-graph-reducer.cc
|
| diff --git a/test/cctest/compiler/test-graph-reducer.cc b/test/cctest/compiler/test-graph-reducer.cc
|
| index eabfd22e77f910ae4b30dc62e8c4e366813cd54a..b94ca45855b46b2e5df517b47af14a1a24dfc825 100644
|
| --- a/test/cctest/compiler/test-graph-reducer.cc
|
| +++ b/test/cctest/compiler/test-graph-reducer.cc
|
| @@ -621,41 +621,3 @@ TEST(Order) {
|
| }
|
| }
|
| }
|
| -
|
| -
|
| -// Tests that a reducer is only applied once.
|
| -class OneTimeReducer : public Reducer {
|
| - public:
|
| - OneTimeReducer(Reducer* reducer, Zone* zone)
|
| - : reducer_(reducer),
|
| - nodes_(NodeSet::key_compare(), NodeSet::allocator_type(zone)) {}
|
| - virtual Reduction Reduce(Node* node) {
|
| - CHECK_EQ(0, static_cast<int>(nodes_.count(node)));
|
| - nodes_.insert(node);
|
| - return reducer_->Reduce(node);
|
| - }
|
| - Reducer* reducer_;
|
| - NodeSet nodes_;
|
| -};
|
| -
|
| -
|
| -TEST(OneTimeReduce1) {
|
| - GraphTester graph;
|
| -
|
| - Node* n1 = graph.NewNode(&OPA0);
|
| - Node* end = graph.NewNode(&OPA1, n1);
|
| - graph.SetEnd(end);
|
| -
|
| - GraphReducer reducer(&graph);
|
| - InPlaceABReducer r;
|
| - OneTimeReducer once(&r, graph.zone());
|
| - reducer.AddReducer(&once);
|
| -
|
| - // Tests A* => B* with in-place updates. Should only be applied once.
|
| - int before = graph.NodeCount();
|
| - reducer.ReduceGraph();
|
| - CHECK_EQ(before, graph.NodeCount());
|
| - CHECK_EQ(&OPB0, n1->op());
|
| - CHECK_EQ(&OPB1, end->op());
|
| - CHECK_EQ(n1, end->InputAt(0));
|
| -}
|
|
|