* Jeff Law: > On 7/17/19 11:29 AM, Andi Kleen wrote: >> Romain Geissler <romain.geiss...@amadeus.com> writes: >>> >>> I have no idea of the LTO format and if indeed it can easily be updated >>> in a backward compatible way. But I would say it would be nice if it >>> could, and would allow adoption for projects spread on many teams >>> depending on each others and unable to re-build everything at each >>> toolchain update. >> >> Right now any change to an compiler option breaks the LTO format >> in subtle ways. In fact even the minor changes that are currently >> done are not frequent enough to catch all such cases. >> >> So it's unlikely to really work.
> Right and stable LTO bytecode really isn't on the radar at this time. Maybe it's better to serialize the non-preprocessed source code instead. It would need some (hash-based?) deduplication. For #include directives, the hash of the file would be captured for reproducibility. Then if the initial #defines are known, the source code after processing can be reproduced exactly. Compressed source code is a surprisingly compact representation of a program, usually smaller than any (compressed) IR dump. Thanks, Florian