From: bmeurer@chromium.org Date: Fri, 26 Sep 2014 06:52:23 +0000 (+0000) Subject: [turbofan] Drop obsolete test after r24236. X-Git-Tag: upstream/4.7.83~6683 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8ff496edfb21da28a4be73f041914d5a0ee31d27;p=platform%2Fupstream%2Fv8.git [turbofan] Drop obsolete test after r24236. This was missing from the previous commit. TBR=jarin@chromium.org Review URL: https://codereview.chromium.org/602193005 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24237 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/test/cctest/compiler/test-graph-reducer.cc b/test/cctest/compiler/test-graph-reducer.cc index eabfd22..b94ca45 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(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)); -}