[llvm] 513717d - [ModuleInliner] Remove a write-only variable (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 16 09:16:03 PDT 2022


Author: Kazu Hirata
Date: 2022-09-16T09:15:53-07:00
New Revision: 513717ddd0a318275352dc47a8984833455841c7

URL: https://github.com/llvm/llvm-project/commit/513717ddd0a318275352dc47a8984833455841c7
DIFF: https://github.com/llvm/llvm-project/commit/513717ddd0a318275352dc47a8984833455841c7.diff

LOG: [ModuleInliner] Remove a write-only variable (NFC)

InlinedCallees is a remnant from the CGSCC inliner.  We don't use it
in the module inliner.

Added: 
    

Modified: 
    llvm/lib/Transforms/IPO/ModuleInliner.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/ModuleInliner.cpp b/llvm/lib/Transforms/IPO/ModuleInliner.cpp
index 0715410a0d304..15d6687a2f43b 100644
--- a/llvm/lib/Transforms/IPO/ModuleInliner.cpp
+++ b/llvm/lib/Transforms/IPO/ModuleInliner.cpp
@@ -189,11 +189,6 @@ PreservedAnalyses ModuleInlinerPass::run(Module &M,
   // index into the InlineHistory vector.
   SmallVector<std::pair<Function *, int>, 16> InlineHistory;
 
-  // Track a set vector of inlined callees so that we can augment the caller
-  // with all of their edges in the call graph before pruning out the ones that
-  // got simplified away.
-  SmallSetVector<Function *, 4> InlinedCallees;
-
   // Track the dead functions to delete once finished with inlining calls. We
   // defer deleting these to make it easier to handle the call graph updates.
   SmallVector<Function *, 4> DeadFunctions;
@@ -251,7 +246,6 @@ PreservedAnalyses ModuleInlinerPass::run(Module &M,
     }
 
     DidInline = true;
-    InlinedCallees.insert(&Callee);
     ++NumInlined;
 
     LLVM_DEBUG(dbgs() << "    Size after inlining: " << F.getInstructionCount()
@@ -314,8 +308,6 @@ PreservedAnalyses ModuleInlinerPass::run(Module &M,
     if (!DidInline)
       continue;
     Changed = true;
-
-    InlinedCallees.clear();
   }
 
   // Now that we've finished inlining all of the calls across this module,


        


More information about the llvm-commits mailing list