This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Stop find_split_point from clobbering constant pool entries
- From: Richard Henderson <rth at redhat dot com>
- To: Richard Sandiford <rsandifo at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 1 Nov 2003 23:19:56 -0800
- Subject: Re: Stop find_split_point from clobbering constant pool entries
- References: <wvnvfq4migz.fsf@talisman.cambridge.redhat.com>
On Sat, Nov 01, 2003 at 11:33:16AM +0000, Richard Sandiford wrote:
> /* A MEM is allowed to be shared if its address is constant.
>
> We used to allow sharing of MEMs which referenced
> virtual_stack_vars_rtx or virtual_incoming_args_rtx, but
> that can lose. instantiate_virtual_regs will not unshare
> the MEMs, and combine may change the structure of the address
> because it looks safe and profitable in one context, but
> in some other context it creates unrecognizable RTL. */
> if (CONSTANT_ADDRESS_P (XEXP (x, 0)))
Personally I think this is bogus. IIRC this can cause problems in
rare cases for amd64 where
(set (reg) (mem (64-bit-constant))
is valid for reg=%rax, but for a different destination register we
have to reload the constant. Which causes reload to run into shared
rtl problems.
IMO we should just remove this special case.
r~