[PATCH] D112517: [NFC] Minor code improvement. Replacing simplifyOnce with simplifyOnceImpl.

Dmitry Bakunevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 25 23:22:14 PDT 2021


dbakunevich created this revision.
dbakunevich added a reviewer: mkazantsev.
Herald added a subscriber: hiraditya.
dbakunevich requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

While fixing the bug, it was discovered that the simplifyOnce function returns the value of the simplifyOnceImpl function. Therefore, it was decided to remove the simplifyOnce function and replace all its calls with simplifyOnceImpl.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112517

Files:
  llvm/lib/Transforms/Utils/SimplifyCFG.cpp


Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp
===================================================================
--- llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -279,7 +279,6 @@
            "PostDomTree, so don't ask for it.");
   }
 
-  bool simplifyOnce(BasicBlock *BB);
   bool simplifyOnceImpl(BasicBlock *BB);
   bool run(BasicBlock *BB);
 
@@ -6760,12 +6759,6 @@
   return Changed;
 }
 
-bool SimplifyCFGOpt::simplifyOnce(BasicBlock *BB) {
-  bool Changed = simplifyOnceImpl(BB);
-
-  return Changed;
-}
-
 bool SimplifyCFGOpt::run(BasicBlock *BB) {
   bool Changed = false;
 
@@ -6775,7 +6768,7 @@
 
     // Perform one round of simplifcation. Resimplify flag will be set if
     // another iteration is requested.
-    Changed |= simplifyOnce(BB);
+    Changed |= simplifyOnceImpl(BB);
   } while (Resimplify);
 
   return Changed;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112517.382196.patch
Type: text/x-patch
Size: 891 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211026/62463d2e/attachment.bin>


More information about the llvm-commits mailing list