Read-only data handling: a proposal
Jeffrey A Law
law@cygnus.com
Mon Sep 15 21:24:00 GMT 1997
In message < 19970915105053.50999@atrey.karlin.mff.cuni.cz >you write:
> I still can make them an externally visible variable which forces them to
> be output under all circumstances. Anyway, there probably should be a switch
> disabling the merge code as its memory requirements (in both my and original
> version of the algorithm) can grow very large for `string table' type
> files. -fno-const-merge ?
Hmm, wait. I thought we already had code to keep/discard static constants
(-fkeep-static-constants or some such) Or are we discussing global constants?
If so it seems to me -fkeep-unused-constants might be the right name for
such an option.
> I was suggesting deferring it until the end of a function -- it's doesn't
> have the problems you've mentioned and it can produce better code on some
> architectures if you have a smart assembler which can convert absolute refs
> to PC-relative refs whenever possible.
It certainly avoids those problems. Of course you lose the opportunity to
merge more constants. But I guess something is better than nothing :-)
The PC-rel stuff is useful, but the number of architectures where such tricks
help are diminishing.
jeff
More information about the Gcc
mailing list