This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] delegitimize pic constructs in more places (PR rtl-optimization/23098)
- From: Richard Henderson <rth at redhat dot com>
- To: Ian Lance Taylor <ian at airs dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 2 Sep 2005 12:16:30 -0700
- Subject: Re: [PATCH] delegitimize pic constructs in more places (PR rtl-optimization/23098)
- References: <20050902173127.GQ7403@devserv.devel.redhat.com> <m3aciviagt.fsf@gossamer.airs.com>
On Fri, Sep 02, 2005 at 11:35:46AM -0700, Ian Lance Taylor wrote:
> Whereas the calls in dwarf2out.c do pass a MEM, not an address.
Inconsistently. All but one instance in dwarf2out.c pass addresses.
> What's up with that? The documentation is not clear on what should be
> passed.
I think the hook should do what it says and take an address.
For the one place in rtl_for_decl_location that wants a mem, I
think we should either create a delegitimize_mem function, or
similar just inline there:
rtx addr = targetm.delegitimize_address (XEXP (mem, 0));
if (addr != XEXP (mem, 0))
mem = replace_equiv_address_nv (mem, addr);
r~