Hi, I'm also interested in this topic and planning to apply.
Recently I'm working on supporting WebAssembly target for Swift.
The size of executable file is really important especially for web context.
Currently, the size of the binary is larger than 10MB even for "Hello, world!" program because whole stdlib content is linked into executable binary statically even most of stdlib parts are not used in runtime.
Even after applying language-agnostic LTO, the binary is still larger than 4MB.
As far as I investigated why the produced binary is so large even after removing unused code applying LTO, I found that most of the remaining functions that are not actually used at runtime are referenced from protocol conformances.
Protocol conformances are embedded in swift5_protocol_conformances section and they are scanned at runtime by runtime library, so they are always marked as llvm.used.
They are very tied to Swift runtime implementation, so language-agnostic LTO can't eliminate them.
So I expect that language-specific LTO can achieve really valuable binary size reduction.
@compnerd
Just to confirm about Phase2, "multiple compiler pipelines" means that lld invokes each language-specific LTCG pipelines for each language-specific intermediate files?
My rough design of this implementation is providing a stable interface of language-specific LTCG plugin, loading plugins dynamically for each language and call each language's compiler through the interface.
Is this idea close to yours?
I would be really happy to help to evolve Swift language and make it available on many platforms to be used by more people.
Thanks.