[Bug lto/99898] Possible LTO object incompatibility on gcc-10 branch
hubicka at ucw dot cz
gcc-bugzilla@gcc.gnu.org
Tue Apr 6 11:32:13 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99898
--- Comment #10 from Jan Hubicka <hubicka at ucw dot cz> ---
> Many of the *.opt changes are target specific, so you'd need to test it also
> across all targets, and furthermore it depends on what exactly is being
> saved/restored, many options might be at the same spot.
> So perhaps we want to compute some hash of the options stuff (e.g. compute it
> by the awk scripts that emit options*.[ch]) and use that to determine LTO
> compatibility in addition to the version?
That would work. One does not really do that in lto header, simply
stream the hash before streaming out the optimization_node decl.
Bit sad would be that w/o version info you have no indication if you
mixed new compiler with old objects or vice versa, but that is minor
anoyance I guess. It would be good that compiler would just
sorryclaiming that it can not read object files created by different
version..
I believe we already safe a diff from default values rather than
streaming out all values. An option would be tom strea the option names
rather than indexes so adding/removing completely unrelated option does
not disturb the file format.
Honza
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
More information about the Gcc-bugs
mailing list