This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR/15448: add a compiler timestamp to PCH files (take 3)
Mike Stump wrote:
On Feb 18, 2005, at 5:41 AM, Paolo Bonzini wrote:
Like the attached patch?
Ah, interesting... my main concern would be speed and size of the PCH
file. If this only adds 1% or less and under 25ms, then, I don't have a
problem with it.
It adds a fixed 2.5 kb to the PCH. I have not timed it, but reading and
comparing 2.5 kb should be less than 2 million clock cycles (it depends
a little on the vagaries of the OS since we use read instead of stdio).
Responding to Geoff, the patch *does* check things that affect PCH.
While checking a single variable would have taken into account the size
of the binary (if variables are stored in memory after the text segment,
which they usually are), what about:
1) a struct whose size changes
2) inner pointers to other GTY globals
3) added or deleted variables (which would result in the whole rtab
sliding by one or more entries).
All these invalidate the PCH.
Paolo