23#include <gtest/gtest.h>
30TEST(DeadCodeEliminationTest, RemovesSingleNodes)
38 ASSERT_EQ(
graph.getNodes().size(), 0);
41TEST(DeadCodeEliminationTest, RemovesChainedNodes)
51 ASSERT_EQ(
graph.getNodes().size(), 0);
54TEST(DeadCodeEliminationTest, PreservesInputNode)
61 ASSERT_EQ(
graph.getNodes().size(), 1);
64TEST(DeadCodeEliminationTest, PreservesOutputNode)
72 ASSERT_EQ(
graph.getNodes().size(), 2);
75TEST(DeadCodeEliminationTest, PreservesUsedNodes)
86 ASSERT_EQ(
graph.getNodes().size(), 4);
This pass removes operations without uses. Importers currently only generate sConstantOps without use...
PassData run(PassData data) override
run compiler pass