From: 박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 Date: Tue, 11 Jun 2019 10:04:06 +0000 (+0900) Subject: [loco] Extend Node with dialect method (#3730) X-Git-Tag: nncc_backup~437 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab8a3f6d4df3b126bb6874449c4be662adbd7594;p=platform%2Fcore%2Fml%2Fnnfw.git [loco] Extend Node with dialect method (#3730) This commit extends Node with dialect method as a step toward multi-dialect support. Signed-off-by: Jonghyun Park --- diff --git a/contrib/loco/include/loco/IR/Node.h b/contrib/loco/include/loco/IR/Node.h index a43af42..0dc809b 100644 --- a/contrib/loco/include/loco/IR/Node.h +++ b/contrib/loco/include/loco/IR/Node.h @@ -20,6 +20,7 @@ #include "loco/ADT/AnnotatedItem.h" #include "loco/IR/Use.h" +#include "loco/IR/Dialect.h" #include #include @@ -62,6 +63,14 @@ public: virtual ~Node() = default; public: + /** + * @brief Return "Dialect" identifier that this node belongs to + * + * dialect() returns nullptr if there is no corresponding dialect. + */ + virtual Dialect *dialect(void) const { return nullptr; } + +public: /// @brief Return the number of arguments virtual uint32_t arity(void) const = 0;