[PATCH] D18346: ThinLTO: special handling for LinkOnce functions

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 1 12:34:12 PDT 2016


tejohnson added a comment.

I still don't see the test, can you update a new patch with that included?


================
Comment at: lib/LTO/ThinLTOCodeGenerator.cpp:176
@@ +175,3 @@
+  // We won't optimize the globals that are referenced by an alias for now
+  // Ideally we should turn the alias in a global and duplicate the definition
+  // when needed.
----------------
s/in a/into a/

================
Comment at: lib/LTO/ThinLTOCodeGenerator.cpp:190
@@ +189,3 @@
+  for (auto &GV : TheModule.globals()) {
+    if (!GlobalInvolvedWithAlias.count(&GV))
+      ResolveODR(GV, Index, TheModule.getModuleIdentifier());
----------------
You can still do the conversion of linkonceodr -> weakodr for the first definition, including for aliases themselves. So you could instead continue to call ResolveODR but pass in the new set and just skip the available externally resetting (you'd have to add the aliases themselves to the set as well).


http://reviews.llvm.org/D18346





More information about the llvm-commits mailing list