Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1281)

Side by Side Diff: test/unittests/compiler/value-numbering-reducer-unittest.cc

Issue 1362783004: Revert of [turbofan] Checking of input counts on node creation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/unittests/compiler/typer-unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <limits> 5 #include <limits>
6 6
7 #include "src/compiler/graph.h" 7 #include "src/compiler/graph.h"
8 #include "src/compiler/node.h" 8 #include "src/compiler/node.h"
9 #include "src/compiler/operator.h" 9 #include "src/compiler/operator.h"
10 #include "src/compiler/value-numbering-reducer.h" 10 #include "src/compiler/value-numbering-reducer.h"
(...skipping 26 matching lines...) Expand all
37 37
38 private: 38 private:
39 Graph graph_; 39 Graph graph_;
40 ValueNumberingReducer reducer_; 40 ValueNumberingReducer reducer_;
41 }; 41 };
42 42
43 43
44 TEST_F(ValueNumberingReducerTest, AllInputsAreChecked) { 44 TEST_F(ValueNumberingReducerTest, AllInputsAreChecked) {
45 Node* na = graph()->NewNode(&kOp0); 45 Node* na = graph()->NewNode(&kOp0);
46 Node* nb = graph()->NewNode(&kOp0); 46 Node* nb = graph()->NewNode(&kOp0);
47 Node* n1 = graph()->NewNode(&kOp1, na); 47 Node* n1 = graph()->NewNode(&kOp0, na);
48 Node* n2 = graph()->NewNode(&kOp1, nb); 48 Node* n2 = graph()->NewNode(&kOp0, nb);
49 EXPECT_FALSE(Reduce(n1).Changed()); 49 EXPECT_FALSE(Reduce(n1).Changed());
50 EXPECT_FALSE(Reduce(n2).Changed()); 50 EXPECT_FALSE(Reduce(n2).Changed());
51 } 51 }
52 52
53 53
54 TEST_F(ValueNumberingReducerTest, DeadNodesAreNeverReturned) { 54 TEST_F(ValueNumberingReducerTest, DeadNodesAreNeverReturned) {
55 Node* n0 = graph()->NewNode(&kOp0); 55 Node* n0 = graph()->NewNode(&kOp0);
56 Node* n1 = graph()->NewNode(&kOp1, n0); 56 Node* n1 = graph()->NewNode(&kOp1, n0);
57 EXPECT_FALSE(Reduce(n1).Changed()); 57 EXPECT_FALSE(Reduce(n1).Changed());
58 n1->Kill(); 58 n1->Kill();
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 TEST_F(ValueNumberingReducerTest, WontReplaceNodeWithItself) { 124 TEST_F(ValueNumberingReducerTest, WontReplaceNodeWithItself) {
125 Node* n = graph()->NewNode(&kOp0); 125 Node* n = graph()->NewNode(&kOp0);
126 EXPECT_FALSE(Reduce(n).Changed()); 126 EXPECT_FALSE(Reduce(n).Changed());
127 EXPECT_FALSE(Reduce(n).Changed()); 127 EXPECT_FALSE(Reduce(n).Changed());
128 } 128 }
129 129
130 } // namespace compiler 130 } // namespace compiler
131 } // namespace internal 131 } // namespace internal
132 } // namespace v8 132 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/typer-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698