[enco] Replace the use of deprecated methods in Bag (#1442)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Tue, 11 Sep 2018 04:40:44 +0000 (13:40 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Tue, 11 Sep 2018 04:40:44 +0000 (13:40 +0900)
This commit replaces the use of deprecated methods in Bag with suggested
ones.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
contrib/enco/core/src/Transforms/Duplicate.cpp
contrib/enco/core/src/Transforms/Normalize.cpp
contrib/enco/core/src/Usage.cpp

index 0587e66..84b9af8 100644 (file)
@@ -69,7 +69,7 @@ void DuplicatePass::runOnModule(coco::Module *m) const
   //   3. Mark the newly created bag as an output
   for (const auto &candidate : candidates)
   {
-    assert(candidate->updates().empty());
+    assert(coco::updaters(candidate).empty());
     assert(input_map.find(candidate) != input_map.end());
     assert(output_map.find(candidate) != output_map.end());
 
index 1e6dd1a..14e88d2 100644 (file)
@@ -183,7 +183,7 @@ void ShuffleGen::mutate(coco::UnitF *unit)
     auto ker_bag = ker_obj->bag();
 
     assert(ker_bag != nullptr);
-    assert(ker_bag->deps().size() == 1);
+    assert(coco::dependent_objects(ker_bag).size() == 1);
     assert((ker_bag->isInput() == false) && (ker_bag->isOutput() == false));
     ker_obj->reorder<nncc::core::ADT::kernel::NHWCLayout>();
   }
index 7f132d4..bc64c9d 100644 (file)
@@ -7,7 +7,7 @@ std::set<coco::Block *> readers(coco::Bag *bag)
 {
   std::set<coco::Block *> res;
 
-  for (auto read : bag->reads())
+  for (auto read : coco::readers(bag))
   {
     assert(read != nullptr);
     auto instr = read->loc();
@@ -25,7 +25,7 @@ std::set<coco::Block *> updaters(coco::Bag *bag)
 {
   std::set<coco::Block *> res;
 
-  for (auto update : bag->updates())
+  for (auto update : coco::updaters(bag))
   {
     assert(update != nullptr);
     auto instr = update->loc();