[PATCH] D22706: Fix : Partial Inliner requires AssumptionCacheTracker

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 22 16:28:16 PDT 2016


silvas added a subscriber: silvas.

================
Comment at: /Users/rriddle/Desktop/llvm/llvm/lib/Transforms/IPO/PartialInlining.cpp:33
@@ -31,14 +32,3 @@
 namespace {
-struct PartialInlinerLegacyPass : public ModulePass {
-  static char ID; // Pass identification, replacement for typeid
-  PartialInlinerLegacyPass() : ModulePass(ID) {
-    initializePartialInlinerLegacyPassPass(*PassRegistry::getPassRegistry());
-  }
-
-  bool runOnModule(Module &M) override {
-    if (skipModule(M))
-      return false;
-    ModuleAnalysisManager DummyMAM;
-    auto PA = Impl.run(M, DummyMAM);
-    return !PA.areAllPreserved();
-  }
+  struct PartialInlinerImpl{
+    PartialInlinerImpl(InlineFunctionInfo IFI) : IFI(IFI){}
----------------
Can you clang-format this class?

================
Comment at: /Users/rriddle/Desktop/llvm/llvm/lib/Transforms/IPO/PartialInlining.cpp:198
@@ +197,3 @@
+PreservedAnalyses PartialInlinerPass::run(Module &M, ModuleAnalysisManager &AM) {
+  InlineFunctionInfo IFI;
+  if (PartialInlinerImpl(IFI).run(M))
----------------
You aren't passing assumption cache analysis stuff in here. This will require some refactoring of stuff that uses InlineFunctionInfo. I've already done that work as part of https://reviews.llvm.org/D21921. Give me a second and I'll spin that out and commit that. Then it should be easy to pass the assumption cache in here.


https://reviews.llvm.org/D22706





More information about the llvm-commits mailing list