<div dir="ltr"><div>While debugging a ThinLTO issue, I noticed that passes were running more often than I expected. This is being invoked pretty normally, something like</div><div><font face="monospace">$ clang++ -fuse-ld=lld -flto=thin</font></div><div><br></div><div>Looks like at [1] we try to first run regular LTO before running ThinLTO. Removing the first line makes the link go from 208s to 115s. Is this expected behavior?</div><div><br></div>[1]: <a href="https://github.com/llvm/llvm-project/blob/a64ebb8637277998f77e55d335faca6fdcf5859b/llvm/lib/LTO/LTO.cpp#L1033">https://github.com/llvm/llvm-project/blob/a64ebb8637277998f77e55d335faca6fdcf5859b/llvm/lib/LTO/LTO.cpp#L1033</a><br></div>