This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATH] PR 5126, fix for m68k PIC optimization bug
On Thu, Dec 27, 2001 at 10:06:16PM +0100, Andreas Schwab wrote:
> Not making the pic register a fixed register does not work, IIRC this is
> because references to the pic register can be created during reload when a
> CONST_DOUBLE needs to be moved to the constant pool, and this is the first
> time a pic reference is needed.
Correct, but I thought regs_ever_live was kept up to date until
reload, which would have the advantage that if all references
to the pic register get optimized away early, you don't load the
pic register, unlike with current_function_uses_pic_offset_table.
You would have to handle updating regs_ever_live during reload
special, but I'd think it possible.
OTOH, x86 continues to use it's own private variable, like
current_function_uses_pic_offset_table, so I don't know if
there's just something that I'm forgetting.
r~