public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-4880] Update TARGET_MEM_REF documentation
@ 2021-11-04  7:42 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2021-11-04  7:42 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:d0d428c4ce425c470120a46427d5964f0bd09f89

commit r12-4880-gd0d428c4ce425c470120a46427d5964f0bd09f89
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Nov 4 08:37:49 2021 +0100

    Update TARGET_MEM_REF documentation
    
    This updates the internals manual documentation of TARGET_MEM_REF
    and amends MEM_REF.  The former was seriously out of date.
    
    2021-11-04  Richard Biener  <rguenther@suse.de>
    
    gcc/
            * doc/generic.texi: Update TARGET_MEM_REF and MEM_REF
            documentation.

Diff:
---
 gcc/doc/generic.texi | 58 ++++++++++++++++++++++++++++------------------------
 1 file changed, 31 insertions(+), 27 deletions(-)

diff --git a/gcc/doc/generic.texi b/gcc/doc/generic.texi
index d317f65fa9f..69f6f375181 100644
--- a/gcc/doc/generic.texi
+++ b/gcc/doc/generic.texi
@@ -1223,25 +1223,12 @@ meanings.  The type of these expressions must be an array whose component
 type is the same as that of the first operand.  The range of that array
 type determines the amount of data these expressions access.
 
-@item TARGET_MEM_REF
-These nodes represent memory accesses whose address directly map to
-an addressing mode of the target architecture.  The first argument
-is @code{TMR_SYMBOL} and must be a @code{VAR_DECL} of an object with
-a fixed address.  The second argument is @code{TMR_BASE} and the
-third one is @code{TMR_INDEX}.  The fourth argument is
-@code{TMR_STEP} and must be an @code{INTEGER_CST}.  The fifth
-argument is @code{TMR_OFFSET} and must be an @code{INTEGER_CST}.
-Any of the arguments may be NULL if the appropriate component
-does not appear in the address.  Address of the @code{TARGET_MEM_REF}
-is determined in the following way.
-
-@smallexample
-&TMR_SYMBOL + TMR_BASE + TMR_INDEX * TMR_STEP + TMR_OFFSET
-@end smallexample
-
-The sixth argument is the reference to the original memory access, which
-is preserved for the purposes of the RTL alias analysis.  The seventh
-argument is a tag representing the results of tree level alias analysis.
+@item COMPONENT_REF
+These nodes represent non-static data member accesses.  The first
+operand is the object (rather than a pointer to it); the second operand
+is the @code{FIELD_DECL} for the data member.  The third operand represents
+the byte offset of the field, but should not be used directly; call
+@code{component_ref_field_offset} instead.
 
 @item ADDR_EXPR
 These nodes are used to represent the address of an object.  (These
@@ -1264,16 +1251,33 @@ pointer or reference type.
 These nodes are used to represent the object pointed to by a pointer
 offset by a constant.
 The first operand is the pointer being dereferenced; it will always have
-pointer or reference type.  The second operand is a pointer constant.
-Its type is specifying the type to be used for type-based alias analysis.
+pointer or reference type.  The second operand is a pointer constant
+serving as constant offset applied to the pointer being dereferenced
+with its type specifying the type to be used for type-based alias analysis.
+The type of the node specifies the alignment of the access.
 
-@item COMPONENT_REF
-These nodes represent non-static data member accesses.  The first
-operand is the object (rather than a pointer to it); the second operand
-is the @code{FIELD_DECL} for the data member.  The third operand represents
-the byte offset of the field, but should not be used directly; call
-@code{component_ref_field_offset} instead.
+@item TARGET_MEM_REF
+These nodes represent memory accesses whose address directly map to
+an addressing mode of the target architecture.  The first argument
+is @code{TMR_BASE} and is a pointer to the object being accessed.
+The second argument is @code{TMR_OFFSET} which is a pointer constant
+with dual purpose serving both as constant offset and holder of
+the type used for type-based alias analysis.  The first two operands
+have exactly the same semantics as @code{MEM_REF}.  The third
+and fourth operand are @code{TMR_INDEX} and @code{TMR_STEP} where
+the former is an integer and the latter an integer constant.  The
+fifth and last operand is @code{TMR_INDEX2} which is an alternate
+non-constant offset.  Any of the third to last operands may be
+@code{NULL} if the corresponding component does not appear in
+the address, but @code{TMR_INDEX} and @code{TMR_STEP} shall be
+always supplied in pair.  The Address of the @code{TARGET_MEM_REF}
+is determined in the following way.
+
+@smallexample
+TMR_BASE + TMR_OFFSET + TMR_INDEX * TMR_STEP + TMR_INDEX2
+@end smallexample
 
+The type of the node specifies the alignment of the access.
 
 @end table


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-04  7:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-04  7:42 [gcc r12-4880] Update TARGET_MEM_REF documentation Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).