The unified LTO pipeline creates a single LTO bitcode structure that can be
used by Thin or Full LTO. This means that LKTO mode can be chosen at link
time and that all LTO bitcode produced by the pipeline is compatible, from
an optimization perspective. This makes the behavior of LTO a bit more
predictable by normalizing the set of LTO features supported by each LTO
bitcode file.
Example usage:
clang -flto -funified-lto foo.c clang -flto -funified-lto bar.c ld.lld --lto=full foo.o bar.o -o baz.elf
The RFC discussing the details and rational for this change is here:
https://discourse.llvm.org/t/rfc-a-unified-lto-bitcode-frontend/61774
Simplify this with if (IsThinLTO || (IsLTO && CodeGenOpts.UnifiedLTO))