[clang] [llvm] [ThinLTO][SplitModuleCG] Add call-graph based module splitting (1/N) (PR #198702)

via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 28 05:51:03 PDT 2026


mmjjpp wrote:

The fixes for the review comments above have been pushed.

> I notice that SplitModule.cpp has some handling to avoid duplicated module inline asm:
>
> https://github.com/llvm/llvm-project/blob/2cf68b2cc466710badbe560ad6081f71c72ed331/llvm/lib/Transforms/Utils/SplitModule.cpp#L294
>
> . Is something similar needed here?

Yes — this was indeed a missed case. `SplitModuleCG::splitModule()` now
calls `MPart->removeModuleInlineAsm()` for `I != 0`, keeping the module
inline asm only in partition 0 (matching llvm::SplitModule), so its
contents are no longer duplicated when the partition objects are linked
together. Added
`llvm/test/tools/llvm-split/SplitModuleCG/module-asm.ll` to verify it.

Noted. I'll avoid force-pushing this PR while the review is in
progress, so the changes since your last review stay visible as
incremental commits.



https://github.com/llvm/llvm-project/pull/198702


More information about the cfe-commits mailing list