[PATCH] D152641: [InstCombine] Remove unused function createInstructionCombiningPass

Kazu Hirata via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 11 07:56:57 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGef09abfcf4a0: [InstCombine] Remove unused function createInstructionCombiningPass (authored by kazu).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152641/new/

https://reviews.llvm.org/D152641

Files:
  llvm/include/llvm/Transforms/InstCombine/InstCombine.h
  llvm/lib/Transforms/InstCombine/InstructionCombining.cpp


Index: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
===================================================================
--- llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -4161,18 +4161,13 @@
       nullptr;
 
   return combineInstructionsOverFunction(F, Worklist, AA, AC, TLI, TTI, DT, ORE,
-                                         BFI, PSI, MaxIterations, LI);
+                                         BFI, PSI,
+                                         InstCombineDefaultMaxIterations, LI);
 }
 
 char InstructionCombiningPass::ID = 0;
 
-InstructionCombiningPass::InstructionCombiningPass()
-    : FunctionPass(ID), MaxIterations(InstCombineDefaultMaxIterations) {
-  initializeInstructionCombiningPassPass(*PassRegistry::getPassRegistry());
-}
-
-InstructionCombiningPass::InstructionCombiningPass(unsigned MaxIterations)
-    : FunctionPass(ID), MaxIterations(MaxIterations) {
+InstructionCombiningPass::InstructionCombiningPass() : FunctionPass(ID) {
   initializeInstructionCombiningPassPass(*PassRegistry::getPassRegistry());
 }
 
@@ -4198,7 +4193,3 @@
 FunctionPass *llvm::createInstructionCombiningPass() {
   return new InstructionCombiningPass();
 }
-
-FunctionPass *llvm::createInstructionCombiningPass(unsigned MaxIterations) {
-  return new InstructionCombiningPass(MaxIterations);
-}
Index: llvm/include/llvm/Transforms/InstCombine/InstCombine.h
===================================================================
--- llvm/include/llvm/Transforms/InstCombine/InstCombine.h
+++ llvm/include/llvm/Transforms/InstCombine/InstCombine.h
@@ -63,13 +63,11 @@
 /// will try to combine all instructions in the function.
 class InstructionCombiningPass : public FunctionPass {
   InstructionWorklist Worklist;
-  const unsigned MaxIterations;
 
 public:
   static char ID; // Pass identification, replacement for typeid
 
   explicit InstructionCombiningPass();
-  explicit InstructionCombiningPass(unsigned MaxIterations);
 
   void getAnalysisUsage(AnalysisUsage &AU) const override;
   bool runOnFunction(Function &F) override;
@@ -88,7 +86,6 @@
 //    %Z = add int 2, %X
 //
 FunctionPass *createInstructionCombiningPass();
-FunctionPass *createInstructionCombiningPass(unsigned MaxIterations);
 }
 
 #undef DEBUG_TYPE


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152641.530301.patch
Type: text/x-patch
Size: 2318 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230611/b8c1a70c/attachment.bin>


More information about the llvm-commits mailing list