literal pool support

David Edelsohn dje@watson.ibm.com
Wed Jul 7 14:28:00 GMT 1999


	Is there a good reason why a compiler should be relying on a
literal pool located in the code segment at all?  The compiler already
needs to provide addressibility for various other forms of data which are
not within a short displacement.  The literal pool supported by the S/390
assembler mostly is a convenience for programmers hand-writing assembly
and provides local data addressibility without doing any work or
dedicating an additional base register.

	Why not limit the code pages to instructions and treat literals as
normal data?

	In some sense, this really is another need for multiple pools just
as the PowerPC port (and others) really could use a data pool, constant
pool, and statics pool.  One would like to let the compiler optimize the
lifetimes of the base registers providing addressibility to the various
pools. 

	The current i370 port seems to have been designed to produce S/370
assembly code as a human would write.  That is not necessarily the most
efficient code that a compiler with register allocation and lifetime
analysis should be producing.

David


More information about the Gcc-patches mailing list