son of subreg rtl documentation

Paolo Bonzini bonzini@gnu.org
Sat Apr 12 21:08:00 GMT 2008


Here's my take on the part on mems, trying to make the usage in s390 
sound less brittle (because cleanups in the area will make it kosher, 
not invalid).

Paolo



@code{subreg}s of @code{mem} can be used in instruction patterns freely, 
however care needs to be put because such @code{subreg}s are considered 
to be @code{register_operand}s rather than @code{memory_operand}s before 
and during reload.  Therefore, if the @code{subreg}s are moved to 
another instructions, they will need not be replaced by plain
@code{mem}s until the reload pass.

On machines that do not do instruction scheduling, combine may also 
create @code{subreg}s of @code{mem}.  For machine that do instruction 
scheduling, the need for reloads will introduce inaccurate scheduling, 
and so @code{subreg}s of @code{mem} should never be used.  Future 
versions of GCC may not allow @code{subreg}s of @code{mem} to be 
considered @code{register_operand}s.  To prepare for this, 
@code{subreg}s of @code{mem} (if needed) should be spelled explicitly in 
the machine description as @code{subreg}s of a @code{memory_operand}.



More information about the Gcc-patches mailing list