[PATCH] D42798: [ThinLTO] - Fix for "ThinLTO inlines variables that should be discarded".
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 1 08:24:29 PST 2018
tejohnson accepted this revision.
tejohnson added a comment.
This revision is now accepted and ready to land.
LGTM with some comment requests below.
================
Comment at: lib/LTO/LTOBackend.cpp:410
+ };
+
+ for (auto &GV : Mod)
----------------
add a FIXME comment somewhere here that we eventually want to drop dead aliases, but that this needs support in convertToDeclaration. Can you also add a FIXME into convertToDeclaration that alias support is needed for dropDeadSymbols to behave correctly for aliases? It would also be great to file a bug to track the alias handling, similar to the bug you filed for global variables for this patch.
================
Comment at: lib/LTO/LTOBackend.cpp:411
+
+ for (auto &GV : Mod)
+ MaybeDrop(GV);
----------------
add comment that this is walking functions (when investigating this I had to go look at Module.h to confirm what is returned by the default iterator).
https://reviews.llvm.org/D42798
More information about the llvm-commits
mailing list