[Inliner] Make ModuleInlinerWrapperPass return PreservedAnalyses::all()
authorArthur Eubanks <aeubanks@google.com>
Mon, 26 Apr 2021 19:53:09 +0000 (12:53 -0700)
committerArthur Eubanks <aeubanks@google.com>
Tue, 27 Apr 2021 00:22:35 +0000 (17:22 -0700)
The ModulePassManager should already have taken care of all analysis
invalidation. Without this change, upcoming changes will cause more
invalidation than necessary.

Reviewed By: mtrofin

Differential Revision: https://reviews.llvm.org/D101320

llvm/lib/Transforms/IPO/Inliner.cpp

index caba83b..1c9800f 100644 (file)
@@ -1036,8 +1036,10 @@ PreservedAnalyses ModuleInlinerWrapperPass::run(Module &M,
   else
     MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(
         createDevirtSCCRepeatedPass(std::move(PM), MaxDevirtIterations)));
-  auto Ret = MPM.run(M, MAM);
+  MPM.run(M, MAM);
 
   IAA.clear();
-  return Ret;
+
+  // The ModulePassManager has already taken care of invalidating analyses.
+  return PreservedAnalyses::all();
 }