This is the mail archive of the gcc@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: birthpoints in rtl.


> My real point in starting this discussion was to try to interest
> (sucker) one of the subreg specialists into helping me solve the issue
> of inserting move at the birthpoint where subregs or strict lower values
> are used. 

I don't see your problem here.  Any use (as in reading) of a
subreg can be conservatively approximated as a use of the entire underlying
register (or memory).
An optimization following the DU information might take a closer look
at such a definition and then decide if the bits referenced are relevant
for its purposes.

Any write to a subreg / strict low part can be conservatively
approximated as a read followed by a write of the entire underlying
register.

If you want to give a bit better information, note that for multi-word hard
registers, only words that contain part of the SUBREG are used / affected.

A write of a subreg with SUBREG_BYTE zero and a mode which is larger than
the mode of the underlying register, or non-partial and the same size as
the mode of the underlying register, writes the entire register, hence you
don't need to read this as a read-modify-write operation.

I'm not sure if we have a definite rule for partial mode subregs that
are the same size as the underlying mode, but it is certainly safe to
treat them as accessing only an (unknown) part of the underlying register.


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