[PATCH] D21915: ThinLTO: Add -thinlto-action=promote-internalize.

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 30 19:14:25 PDT 2016


tejohnson added inline comments.

================
Comment at: test/ThinLTO/X86/alias_import.ll:91
@@ +90,3 @@
+; Promotion + internalization should internalize all of these (except for aliases of
+; linkonce_odr functions for some reason).
+; PROMOTE-INTERNALIZE-DAG: @globalfuncAlias = internal alias void (...), bitcast (void ()* @globalfunc to void (...)*)
----------------
Probably because alias to linkonce odr are the only aliases we will import. So they will be exported and therefore not internalizable. See selectCallee() in FunctionImport.cpp

================
Comment at: tools/llvm-lto/llvm-lto.cpp:100
@@ +99,3 @@
+        clEnumValN(
+            THINPROMOTEINTERNALIZE, "promote-internalize",
+            "Perform promotion and internalization (requires -thinlto-index)."),
----------------
Rather than add a new type here, can the test just do two invocations of llvm-lto - one invoking promotion and then feeding the resulting bitcode into another invoking internalization?


http://reviews.llvm.org/D21915





More information about the llvm-commits mailing list