[PATCH] D33540: [PM/ThinLTO] Port the ThinLTO pipeline (both components) to the new PM.

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 07:12:48 PDT 2017


tejohnson added a comment.

> I hoisted the ThinLTO stop point pre-link above the partial inliner and the RPO function attr inference. Partial inlining isn't going to make the code smaller and it seems better to just do that once post-link.

Added davidxl to comment on this change. It seems like doing some partial inlining during the pre-link for ThinLTO will have an effect on the importing. Also, it is pre-link (as well as post-link) in the old pass pipeline, so this would introduce an inconsistency between the pass pipelines. May be better to keep it in the same places, and evaluate the effect of removing it from the pre-link pass pipeline separately?



================
Comment at: lib/Passes/PassBuilder.cpp:583
 
-  // Eliminate externally available functions now that inlining is over -- we
-  // won't emit these anyways.
+  // Remove avail extern fns and globals definitions if we aren't compiling an
+  // object file for later LTO. For LTO we want to preserve these so they are
----------------
s/if/since/ (we aren't compiling an object file for later LTO). Since we don't invoke this in the pre-link *LTO pipelines.


================
Comment at: lib/Passes/PassBuilder.cpp:708
+ModulePassManager
+PassBuilder::buildThinLTOPreLinkDefaultPipeline(OptimizationLevel Level,
+                                                bool DebugLogging) {
----------------
I don't see this getting invoked.


https://reviews.llvm.org/D33540





More information about the llvm-commits mailing list