This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] delegitimize pic constructs in more places (PR rtl-optimization/23098)


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]