From 6427ba0770717c82925b114ff44126b439eddecf Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=84=B8=ED=9D=AC/On-Device=20Lab=28SR=29/Princip?= =?utf8?q?al=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Wed, 9 Jan 2019 17:14:16 +0900 Subject: [PATCH] [enco] add comments for loads in DataLayoutConversion (#2789) * [enco] add comments for loads in DataLayoutConversion This will add some comments explaining the condition Signed-off-by: SaeHie Park * remove 'deleted' * add about bounded * use 'note' --- contrib/enco/core/src/Transforms/DataLayoutConversion.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/enco/core/src/Transforms/DataLayoutConversion.cpp b/contrib/enco/core/src/Transforms/DataLayoutConversion.cpp index 29202a7..9d65d1c 100644 --- a/contrib/enco/core/src/Transforms/DataLayoutConversion.cpp +++ b/contrib/enco/core/src/Transforms/DataLayoutConversion.cpp @@ -245,6 +245,8 @@ namespace /** * @brief Return the set of all of bounded Load Op(s) in a given module + * + * @note 'bounded' means it will be exectuted */ std::set loads(coco::Module *m) { @@ -254,11 +256,13 @@ std::set loads(coco::Module *m) { auto op = m->entity()->op()->at(n); + // Skip if this op is dangling if (op->parent() == nullptr) { continue; } + // Skip if eval instruction of this op is dangling if (op->parent()->parent() == nullptr) { continue; -- 2.7.4