[PATCH] D37773: Refactor the code to pass down ACT to SampleProfileLoader correctly.

Easwaran Raman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 12 14:56:14 PDT 2017


eraman accepted this revision.
eraman added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:1486
 bool SampleProfileLoaderLegacyPass::runOnModule(Module &M) {
-  // FIXME: pass in AssumptionCache correctly for the new pass manager.
-  SampleLoader.setACT(&getAnalysis<AssumptionCacheTracker>());
+  ACT = &getAnalysis<AssumptionCacheTracker>();
   return SampleLoader.runOnModule(M, nullptr);
----------------
eraman wrote:
> Since ACT is an immutable pass that doesn't require the module, you can move the initialization of ACT to the constructor  of the legacy pass.
(Dehao explained offline why this won't work)


https://reviews.llvm.org/D37773





More information about the llvm-commits mailing list