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: subreg rtl documentation


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


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