[logo] Fix to make same pattern (#6954)
author박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Tue, 27 Aug 2019 08:14:24 +0000 (17:14 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Tue, 27 Aug 2019 08:14:24 +0000 (17:14 +0900)
This will fix Restart PhaseRunner to follow Saturate of run() return value pattern

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
compiler/logo/src/Phase.cpp

index 6964302..f842290 100644 (file)
@@ -41,10 +41,8 @@ void PhaseRunner<PhaseStrategy::Restart>::run(const Phase &phase) const
 
     for (auto &pass : phase)
     {
-      if (pass->run(_graph))
-      {
-        changed = true;
-      }
+      bool pass_changed = pass->run(_graph);
+      changed = changed || pass_changed;
 
       if (changed)
       {