From 85c1f87c49f23471428d52ec4f71a7cace98acea 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: Fri, 2 Aug 2019 14:25:56 +0900 Subject: [PATCH] [locop] Use default_node_desc directly (#6141) The current implementation of BuiltinNodeSummaryBuilder invokes default_node_desc through node_desc helper. This commit removes this unnecessary redirection. Signed-off-by: Jonghyun Park --- compiler/locop/src/FormattedGraph.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/compiler/locop/src/FormattedGraph.cpp b/compiler/locop/src/FormattedGraph.cpp index a855e40..9b09a85 100644 --- a/compiler/locop/src/FormattedGraph.cpp +++ b/compiler/locop/src/FormattedGraph.cpp @@ -326,18 +326,6 @@ NodeDesc canonical_node_desc(const SymbolTable &tbl, const loco::CanonicalNode * return canonical_node->accept(&builder); } -NodeDesc node_desc(const SymbolTable &tbl, const loco::Node *node) -{ - if (node->dialect() == loco::CanonicalDialect::get()) - { - auto canonical_node = dynamic_cast(node); - assert(canonical_node != nullptr); - return canonical_node_desc(tbl, canonical_node); - } - - return default_node_desc(tbl, node); -} - struct BuiltinNodeSummaryBuilder final : public locop::NodeSummaryBuilder { public: @@ -349,7 +337,7 @@ public: public: bool build(const loco::Node *node, locop::NodeSummary &summary) const final { - summary = node_desc(*_symtbl, node); + summary = default_node_desc(*_symtbl, node); return true; } -- 2.7.4