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


Richard Sandiford wrote:
Kenneth Zadeck <zadeck@naturalbridge.com> writes:
Also the deleted text in rtl.c that jim was complaining about said:
=============================
@cindex combiner pass
@cindex reload pass
@cindex @code{subreg}, special reload handling
Between the combiner pass and the reload pass, it is possible to have a
paradoxical @code{subreg} which contains a @code{mem} instead of a
@code{reg} as its first operand. After the reload pass, it is also
possible to have a non-paradoxical @code{subreg} which contains a
@code{mem}; this usually occurs when the @code{mem} is a stack slot
which replaced a pseudo register.
==============================
My reading of this text is (and the answer could be that this is just badly written) is that
if you have a subreg of mem before reload, then it must be paradoxical, and if you have a subreg of mem after reload it must not be paradoxical.

Hmm. Does anyone know if we really do still allow (subreg (mem)) after reload? I thought these days, alter_subreg would replace them with MEMs.

I don't think we do. reload makes a pass over all the insns calling cleanup_subreg_operands which ought to be zapping all the (subreg (mem)) thingies and replacing (subreg (hardreg)) with (hardreg')


Jeff


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