Some functions are not getting added to the combined module that will be optimized later. Knowing which functions were removed could be useful for debugging or for detecting dead code. While getting the list of removed functions is not hard, optimizations remarks were not set up until just before opt was run. I moved this setup process a bit earlier for regular LTO so I can emit remarks. See http://lists.llvm.org/pipermail/llvm-dev/2020-January/138660.html for the discussion.
Note that, I did not change ThinLTO, as those modules will only be available later on.
Details
Diff Detail
Event Timeline
llvm/lib/LTO/LTO.cpp | ||
---|---|---|
789 | This is not the usual way we add strings with arguments to remarks. Please use << "STR: " << ore::NV("Function", F). |
llvm/lib/LTO/LTO.cpp | ||
---|---|---|
789 | Thanks! |
llvm/lib/LTO/LTO.cpp | ||
---|---|---|
967 | Can you add a FIXME here noting that this is checking both Regular and Thin LTO and should be split into two, one checking Regular here and the other checking the ThinLTO index in runThinLTO? This does work since we always go through this path, but logically it would make more sense to do the ThinLTO checking in runThinLTO. Unfortunately, the regular LTO checking this is doing must be after linkRegularLTO. | |
llvm/test/LTO/Resolution/X86/dead-strip-fulllto.ll | ||
19 | Is the yaml remark more verbose than this (i.e. it includes your message)? Would be good to include more of it. |
llvm/lib/LTO/LTO.cpp | ||
---|---|---|
789 | These changes and the test updates look good to me fwiw! Thanks! |
This is not the usual way we add strings with arguments to remarks. Please use << "STR: " << ore::NV("Function", F).