From 329b909500ec7687dd15c5b2cedd1d1f0921bcda Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/On-Device=20Lab=28SR=29/Staff?= =?utf8?q?=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Mon, 29 Jul 2019 20:13:31 +0900 Subject: [PATCH] [loco] Remove unused input_nodes helper (#5972) * [loco] Remove unused input_nodes helper This commit removes unused input_nodes helper. This helper is currently unused, but its presence makes it difficult to decouple loco core from loco canonical. Signed-off-by: Jonghyun Park * Remove the implementation --- compiler/loco/include/loco/IR/Graph.h | 1 - compiler/loco/src/IR/Graph.cpp | 13 ------------- compiler/loco/src/IR/Graph.test.cpp | 6 ------ 3 files changed, 20 deletions(-) diff --git a/compiler/loco/include/loco/IR/Graph.h b/compiler/loco/include/loco/IR/Graph.h index 9b98c0d..269c362 100644 --- a/compiler/loco/include/loco/IR/Graph.h +++ b/compiler/loco/include/loco/IR/Graph.h @@ -210,7 +210,6 @@ private: }; // TODO Use "const Graph *" -std::vector input_nodes(Graph *); std::vector output_nodes(Graph *); /** diff --git a/compiler/loco/src/IR/Graph.cpp b/compiler/loco/src/IR/Graph.cpp index e9e2004..a1b4bc5 100644 --- a/compiler/loco/src/IR/Graph.cpp +++ b/compiler/loco/src/IR/Graph.cpp @@ -31,19 +31,6 @@ std::set all_nodes(loco::Graph *g) return res; } -std::vector input_nodes(loco::Graph *g) -{ - std::vector res; - - for (uint32_t n = 0; n < g->inputs()->size(); ++n) - { - auto node = g->inputs()->at(n)->node(); - res.emplace_back(node); - } - - return res; -} - std::vector output_nodes(loco::Graph *g) { std::vector res; diff --git a/compiler/loco/src/IR/Graph.test.cpp b/compiler/loco/src/IR/Graph.test.cpp index 319ee6d..636a2bb 100644 --- a/compiler/loco/src/IR/Graph.test.cpp +++ b/compiler/loco/src/IR/Graph.test.cpp @@ -164,12 +164,6 @@ TEST(GraphTest, graph_inout_enumeration) g->outputs()->create()->node(push_1); g->outputs()->create()->node(push_3); - auto input_nodes = loco::input_nodes(g.get()); - - ASSERT_EQ(input_nodes.size(), 2); - ASSERT_EQ(input_nodes.at(0), g->inputs()->at(0)->node()); - ASSERT_EQ(input_nodes.at(1), g->inputs()->at(1)->node()); - auto output_nodes = loco::output_nodes(g.get()); ASSERT_EQ(output_nodes.size(), 2); -- 2.7.4