#include "src/compiler/dead-code-elimination.h"
#include "src/compiler/common-operator.h"
#include "test/unittests/compiler/graph-reducer-unittest.h"
#include "test/unittests/compiler/graph-unittest.h"
#include "test/unittests/compiler/node-test-utils.h"
StrictMock;
namespace v8 {
namespace internal {
namespace compiler {
namespace dead_code_elimination_unittest {
class DeadCodeEliminationTest : public GraphTest { … };
namespace {
const MachineRepresentation kMachineRepresentations[] = …;
const int kMaxInputs = …;
const Operator kOp0(0, Operator::kNoProperties, "Op0", 1, 1, 1, 1, 1, 1);
}
TEST_F(DeadCodeEliminationTest, GeneralDeadPropagation) { … }
TEST_F(DeadCodeEliminationTest, BranchWithDeadControlInput) { … }
TEST_F(DeadCodeEliminationTest, IfTrueWithDeadInput) { … }
TEST_F(DeadCodeEliminationTest, IfFalseWithDeadInput) { … }
TEST_F(DeadCodeEliminationTest, IfSuccessWithDeadInput) { … }
TEST_F(DeadCodeEliminationTest, IfExceptionWithDeadControlInput) { … }
TEST_F(DeadCodeEliminationTest, EndWithDeadAndStart) { … }
TEST_F(DeadCodeEliminationTest, EndWithOnlyDeadInputs) { … }
TEST_F(DeadCodeEliminationTest, MergeWithOnlyDeadInputs) { … }
TEST_F(DeadCodeEliminationTest, MergeWithOneLiveAndOneDeadInput) { … }
TEST_F(DeadCodeEliminationTest, MergeWithTwoLiveAndTwoDeadInputs) { … }
TEST_F(DeadCodeEliminationTest, LoopWithDeadFirstInput) { … }
TEST_F(DeadCodeEliminationTest, LoopWithOnlyDeadInputs) { … }
TEST_F(DeadCodeEliminationTest, LoopWithOneLiveAndOneDeadInput) { … }
TEST_F(DeadCodeEliminationTest, LoopWithTwoLiveAndTwoDeadInputs) { … }
TEST_F(DeadCodeEliminationTest, PhiWithDeadControlInput) { … }
TEST_F(DeadCodeEliminationTest, EffectPhiWithDeadControlInput) { … }
TEST_F(DeadCodeEliminationTest, TerminateWithDeadControlInput) { … }
}
}
}
}