This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, ARM] Don't copy uncopyable instructions in gcse.c
- From: Daniel Jacobowitz <drow at false dot org>
- To: Julian Brown <julian at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 20 May 2009 19:06:23 -0400
- Subject: Re: [PATCH, ARM] Don't copy uncopyable instructions in gcse.c
- References: <20090520215628.1070c224@rex.config>
On Wed, May 20, 2009 at 09:56:28PM +0100, Julian Brown wrote:
> (I'm not sure what the side-effects of rewriting the
> pic_load_dot_plus_four implementation to allow being copied would be,
> hence not simply doing that. E.g. I'm not sure if references to the
> label it outputs are ever made from beyond the insn.)
The label is used from another insn. See arm_load_pic_register.
The label has to be attached to the instruction that adds PC, but
the constant offset from the label to the GOT is in another
instruction. Without making this a single RTL instruction I don't see
how to make it copyable. Doesn't some other port have this
problem?
Using a single label per function would require an additional
instruction but might increase constant pool sharing.
> (*) Though there are surely many other places which can copy insns
> within the compiler, so this seems like a bit of a papering-over. I'm
> not sure why the problem is only coming to light now -- maybe these
> types of PIC reference are appearing much earlier in compilation than
> they used to?
Fallout from the expand-from-ssa changes maybe? Michael had to fix up
a caller of arm_load_pic_register. But really, I'm pretty sure we've
always put these in the instruction stream at expand time.
--
Daniel Jacobowitz
CodeSourcery