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

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

Issue 1193833002: [turbofan] Proper dead code elimination as regular reducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Renamed DeadControl to Dead. Created 5 years, 6 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
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 "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/node.h" 7 #include "src/compiler/node.h"
8 #include "src/compiler/operator.h" 8 #include "src/compiler/operator.h"
9 #include "test/unittests/compiler/graph-reducer-unittest.h" 9 #include "test/unittests/compiler/graph-reducer-unittest.h"
10 #include "test/unittests/test-utils.h" 10 #include "test/unittests/test-utils.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 268
269 269
270 namespace { 270 namespace {
271 271
272 struct ReplaceWithValueReducer final : public AdvancedReducer { 272 struct ReplaceWithValueReducer final : public AdvancedReducer {
273 explicit ReplaceWithValueReducer(Editor* editor) : AdvancedReducer(editor) {} 273 explicit ReplaceWithValueReducer(Editor* editor) : AdvancedReducer(editor) {}
274 Reduction Reduce(Node* node) final { return NoChange(); } 274 Reduction Reduce(Node* node) final { return NoChange(); }
275 using AdvancedReducer::ReplaceWithValue; 275 using AdvancedReducer::ReplaceWithValue;
276 }; 276 };
277 277
278 const Operator kMockOperator(IrOpcode::kDeadControl, Operator::kNoProperties, 278 const Operator kMockOperator(IrOpcode::kDead, Operator::kNoProperties,
279 "MockOperator", 0, 0, 0, 1, 0, 0); 279 "MockOperator", 0, 0, 0, 1, 0, 0);
280 const Operator kMockOpEffect(IrOpcode::kDeadControl, Operator::kNoProperties, 280 const Operator kMockOpEffect(IrOpcode::kDead, Operator::kNoProperties,
281 "MockOpEffect", 0, 1, 0, 1, 1, 0); 281 "MockOpEffect", 0, 1, 0, 1, 1, 0);
282 const Operator kMockOpControl(IrOpcode::kDeadControl, Operator::kNoProperties, 282 const Operator kMockOpControl(IrOpcode::kDead, Operator::kNoProperties,
283 "MockOpControl", 0, 0, 1, 1, 0, 1); 283 "MockOpControl", 0, 0, 1, 1, 0, 1);
284 284
285 const IfExceptionHint kNoHint = IfExceptionHint::kLocallyCaught; 285 const IfExceptionHint kNoHint = IfExceptionHint::kLocallyCaught;
286 286
287 } // namespace 287 } // namespace
288 288
289 289
290 TEST_F(AdvancedReducerTest, ReplaceWithValue_ValueUse) { 290 TEST_F(AdvancedReducerTest, ReplaceWithValue_ValueUse) {
291 CommonOperatorBuilder common(zone()); 291 CommonOperatorBuilder common(zone());
292 Node* node = graph()->NewNode(&kMockOperator); 292 Node* node = graph()->NewNode(&kMockOperator);
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 EXPECT_EQ(&kOpC0, n1->op()); 850 EXPECT_EQ(&kOpC0, n1->op());
851 EXPECT_EQ(&kOpC1, end->op()); 851 EXPECT_EQ(&kOpC1, end->op());
852 EXPECT_EQ(n1, end->InputAt(0)); 852 EXPECT_EQ(n1, end->InputAt(0));
853 } 853 }
854 } 854 }
855 } 855 }
856 856
857 } // namespace compiler 857 } // namespace compiler
858 } // namespace internal 858 } // namespace internal
859 } // namespace v8 859 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/dead-code-elimination-unittest.cc ('k') | test/unittests/compiler/graph-trimmer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698