[clang] [lld] [llvm] [LTO][LLD] Prevent invalid LTO libfunc transforms (PR #164916)
Teresa Johnson via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 11 08:04:29 PST 2026
================
@@ -1409,11 +1409,11 @@ runThinLTOBackend(CompilerInstance &CI, ModuleSummaryIndex *CombinedIndex,
// FIXME: Both ExecuteAction and thinBackend set up optimization remarks for
// the same context.
finalizeLLVMOptimizationRemarks(M->getContext());
- if (Error E =
- thinBackend(Conf, -1, AddStream, *M, *CombinedIndex, ImportList,
- ModuleToDefinedGVSummaries[M->getModuleIdentifier()],
- /*ModuleMap=*/nullptr, Conf.CodeGenOnly,
- /*IRAddStream=*/nullptr, CGOpts.CmdArgs)) {
+ if (Error E = thinBackend(
+ Conf, -1, AddStream, *M, *CombinedIndex, ImportList,
+ ModuleToDefinedGVSummaries[M->getModuleIdentifier()],
+ /*ModuleMap=*/nullptr, Conf.CodeGenOnly, /*BitcodeLibFuncs=*/{},
----------------
teresajohnson wrote:
I just realized this is not going to work for distributed ThinLTO, which comes through here. This needs a callout in the PR description, and a FIXME here and probably in the LTO backend where this is consulted.
To fix this, we'll need to serialize the info through the ThinLTO summary files. Which isn't hard but it is a bit of bitcode wiring.
https://github.com/llvm/llvm-project/pull/164916
More information about the cfe-commits
mailing list