[PATCH] D116054: Avoid duplicating uniqueness in ThinLTO when unique internal linkage names are used
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 20 14:28:43 PST 2021
tejohnson added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/FunctionImportUtils.cpp:266
+ // uniqueifying the name. This will directly reduce .strtab size.
+ if (Name.find(".__uniq.") == std::string::npos)
+ GV.setName(getPromotedName(&GV));
----------------
Better to do this in ModuleSummaryIndex::getGlobalNameForLocal (called by getPromotedName) so that it automatically handles all cases. E.g. without that fix cross-module WPD to a local function (requiring promotion) will be broken (we will promote on the devirt side but no longer on the def side).
E.g. see llvm/test/ThinLTO/X86/devirt_promote.ll. Although unfortunately this test case will not catch the breakage since we have hardcoded IR names in the test, i.e. it isn't being generated by -funique-internal-linkage-names.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116054/new/
https://reviews.llvm.org/D116054
More information about the llvm-commits
mailing list