[PATCH] D19813: Move "Eliminate Available Externally" immediately after the inliner

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Tue May 3 08:29:49 PDT 2016


joker.eph added inline comments.

================
Comment at: lib/Transforms/IPO/PassManagerBuilder.cpp:410
@@ +409,3 @@
+    // 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 eligible for inlining at link-time. Note if they
----------------
Clang will set `PrepareForLTO` even when `-flto=thin`. But I'm not sure if it is a good thing, we may want to distinguish between the two so it seems better to me to not rely on `PrepareForLTO` in ThinLTO mode.


http://reviews.llvm.org/D19813





More information about the llvm-commits mailing list