On Thu, 2025-03-27 at 15:33:44 +0000, Sam James wrote: > > One thing I wasn't quite sure on yet: is -flto-partition=cache automatic > with -flto-incremental? Or is it just an optional flag I can pass for > more effective incremental LTO? > > If it's the latter, should we mention that in the -flto-incremental > documentation? >
It is not automatic, because different partitioning will result in different executable. Most of the time this should not matter, but for example a performance bug depending on instruction alignment would not be reproduced. The cache partitioning is most useful with large amount of divergences per diverging partition. Which was very useful at the start, but it happens less with each divergence I remove. Last time I measured it, the improvement was no longer noticeable without debug symbols and only a few percent improvement with debug symbols, with one outlier case being ~50 % worse. The benefits are minor, a bit unclear, and caveats are hard to properly explain. So I do not want to actively recommend the option for now. > > [...] > > Thanks for working on incremental LTO. I had the opportunity to use it > for a bug for the first time last weekend and enjoyed it. Thanks, glad it is already useful. Michal