This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: subreg rtl documentation
- From: Jim Wilson <wilson at tuliptree dot org>
- To: Kenneth Zadeck <zadeck at naturalbridge dot com>
- Cc: Kenneth dot Zadeck at NaturalBridge dot com, gcc-patches at gcc dot gnu dot org, "Bonzini, Paolo" <bonzini at gnu dot org>, Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>, Bernd Schmidt <bernds_cb1 at t-online dot de>, "Joseph S. Myers" <joseph at codesourcery dot com>, Joern Rennecke <joernr at arc dot com>, Jeff Law <law at redhat dot com>, rsandifo at nildram dot co dot uk
- Date: Mon, 07 Apr 2008 13:45:43 -0700
- Subject: Re: subreg rtl documentation
- References: <87wsnda8bu.fsf@moria.site> <87ej9l8tad.fsf@firetop.home> <47FA40CC.5070503@naturalbridge.com> <87skxxabop.fsf@firetop.home> <47FA61D3.70504@tuliptree.org> <47FA6A4E.4090208@naturalbridge.com>
On Mon, 2008-04-07 at 14:39 -0400, Kenneth Zadeck wrote:
> Thanks, I of course should have invited you from the beginning on this
> issue.
I was following the discussion on the gcc lists. I just didn't have
much time to contribute, and Joern seemed to be handling it just fine.
I don't have any issues with what you did.
> Unlike the area of subregs of hardregs, where the consensus opinion was
> that these should go away, there was just not much said about subregs of
> mems and it looks like the issue fell between the cracks.
I think subreg mem should go away too. I have pontificated on this in
the past, but never got around to doing the work myself.
The nasty thing about subreg mem is that since subregs are always
accepted by register_operand even if they have a MEM operand (see the
code in register_operand), a subreg mem is treated like a register up
until you reach reload, at which point reload generates an load/store
insn if necessary. For the original m68k/i386 targets this was fine,
since most instructions accepted mem operands, it meant that reload
might not have to do any work to fix this. This is wrong for RISC
targets though, and really shouldn't be the default. We can always use
combine to put the mem reference back in, but we should not be relying
on reload to fix something that we know from the beginning will need to
be fixed.
Jim