From 32e05d51b67720746b2ddfc8a1d14669b6f6042b 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, 26 Aug 2019 16:33:54 +0900 Subject: [PATCH] [loco] Remove unused methods from Push (#6904) No code uses "rank" and "dim" method in Push class. Signed-off-by: Jonghyun Park --- compiler/loco/include/loco/IR/Nodes.h | 7 ------- compiler/loco/src/IR/Nodes.cpp | 14 -------------- 2 files changed, 21 deletions(-) diff --git a/compiler/loco/include/loco/IR/Nodes.h b/compiler/loco/include/loco/IR/Nodes.h index 9f4a73d..11bdc7a 100644 --- a/compiler/loco/include/loco/IR/Nodes.h +++ b/compiler/loco/include/loco/IR/Nodes.h @@ -74,13 +74,6 @@ public: */ bool indexed(void) const { return _index != -1; } -public: - // This method works only when "graph() != nullptr" and "indexed()" - uint32_t rank(void) const; - - // This method works only when "graph() != nullptr" and "indexed()" - const Dimension &dim(uint32_t axis) const; - private: int64_t _index = -1; // Uninitialized }; diff --git a/compiler/loco/src/IR/Nodes.cpp b/compiler/loco/src/IR/Nodes.cpp index f480e7a..df74e0c 100644 --- a/compiler/loco/src/IR/Nodes.cpp +++ b/compiler/loco/src/IR/Nodes.cpp @@ -57,20 +57,6 @@ GraphOutputIndex Push::index(void) const return static_cast(_index); } -uint32_t Push::rank(void) const -{ - assert(graph() != nullptr); - assert(indexed()); - return graph()->outputs()->at(index())->shape()->rank(); -} - -const Dimension &Push::dim(uint32_t axis) const -{ - assert(graph() != nullptr); - assert(indexed()); - return graph()->outputs()->at(index())->shape()->dim(axis); -} - void link(GraphOutput *output, Push *push) { push->index(output->index()); } Push *push_node(Graph *g, const GraphOutputIndex &index) -- 2.7.4