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

Side by Side Diff: test/unittests/compiler/common-operator-unittest.cc

Issue 1186033006: [turbofan] Introduce DeadValue and DeadEffect operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. 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 <limits> 5 #include <limits>
6 6
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/opcodes.h" 8 #include "src/compiler/opcodes.h"
9 #include "src/compiler/operator.h" 9 #include "src/compiler/operator.h"
10 #include "src/compiler/operator-properties.h" 10 #include "src/compiler/operator-properties.h"
(...skipping 30 matching lines...) Expand all
41 41
42 const SharedOperator kSharedOperators[] = { 42 const SharedOperator kSharedOperators[] = {
43 #define SHARED(Name, properties, value_input_count, effect_input_count, \ 43 #define SHARED(Name, properties, value_input_count, effect_input_count, \
44 control_input_count, value_output_count, effect_output_count, \ 44 control_input_count, value_output_count, effect_output_count, \
45 control_output_count) \ 45 control_output_count) \
46 { \ 46 { \
47 &CommonOperatorBuilder::Name, IrOpcode::k##Name, properties, \ 47 &CommonOperatorBuilder::Name, IrOpcode::k##Name, properties, \
48 value_input_count, effect_input_count, control_input_count, \ 48 value_input_count, effect_input_count, control_input_count, \
49 value_output_count, effect_output_count, control_output_count \ 49 value_output_count, effect_output_count, control_output_count \
50 } 50 }
51 SHARED(Dead, Operator::kFoldable, 0, 0, 0, 0, 0, 1),
52 SHARED(IfTrue, Operator::kKontrol, 0, 0, 1, 0, 0, 1), 51 SHARED(IfTrue, Operator::kKontrol, 0, 0, 1, 0, 0, 1),
53 SHARED(IfFalse, Operator::kKontrol, 0, 0, 1, 0, 0, 1), 52 SHARED(IfFalse, Operator::kKontrol, 0, 0, 1, 0, 0, 1),
54 SHARED(IfSuccess, Operator::kKontrol, 0, 0, 1, 0, 0, 1), 53 SHARED(IfSuccess, Operator::kKontrol, 0, 0, 1, 0, 0, 1),
55 SHARED(Throw, Operator::kKontrol, 1, 1, 1, 0, 0, 1), 54 SHARED(Throw, Operator::kKontrol, 1, 1, 1, 0, 0, 1),
56 SHARED(Return, Operator::kNoThrow, 1, 1, 1, 0, 0, 1), 55 SHARED(Return, Operator::kNoThrow, 1, 1, 1, 0, 0, 1),
57 SHARED(Terminate, Operator::kKontrol, 0, 1, 1, 0, 0, 1) 56 SHARED(Terminate, Operator::kKontrol, 0, 1, 1, 0, 0, 1),
57 SHARED(DeadValue, Operator::kPure, 0, 0, 0, 1, 0, 0),
58 SHARED(DeadEffect, Operator::kPure, 0, 0, 0, 0, 1, 0),
59 SHARED(DeadControl, Operator::kFoldable, 0, 0, 0, 0, 0, 1)
58 #undef SHARED 60 #undef SHARED
59 }; 61 };
60 62
61 63
62 class CommonSharedOperatorTest 64 class CommonSharedOperatorTest
63 : public TestWithZone, 65 : public TestWithZone,
64 public ::testing::WithParamInterface<SharedOperator> {}; 66 public ::testing::WithParamInterface<SharedOperator> {};
65 67
66 } // namespace 68 } // namespace
67 69
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 EXPECT_EQ(arguments + 1, OperatorProperties::GetTotalInputCount(op)); 377 EXPECT_EQ(arguments + 1, OperatorProperties::GetTotalInputCount(op));
376 EXPECT_EQ(0, op->ControlOutputCount()); 378 EXPECT_EQ(0, op->ControlOutputCount());
377 EXPECT_EQ(0, op->EffectOutputCount()); 379 EXPECT_EQ(0, op->EffectOutputCount());
378 EXPECT_EQ(1, op->ValueOutputCount()); 380 EXPECT_EQ(1, op->ValueOutputCount());
379 } 381 }
380 } 382 }
381 383
382 } // namespace compiler 384 } // namespace compiler
383 } // namespace internal 385 } // namespace internal
384 } // namespace v8 386 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-loop-analysis.cc ('k') | test/unittests/compiler/graph-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698