Next:Unary and Binary Expressions, Previous:Constant expressions, Up:Expressions [Contents][Index]
ARRAY_REFThese nodes represent array accesses. The first operand is the array;the second is the index. To calculate the address of the memoryaccessed, you must scale the index by the size of the type of the arrayelements. The type of these expressions must be the type of a component ofthe array. The third and fourth operands are used after gimplificationto represent the lower bound and component size but should not be useddirectly; callarray_ref_low_bound andarray_ref_element_sizeinstead.
ARRAY_RANGE_REFThese nodes represent access to a range (or “slice”) of an array. Theoperands are the same as that forARRAY_REF and have the samemeanings. The type of these expressions must be an array whose componenttype is the same as that of the first operand. The range of that arraytype determines the amount of data these expressions access.
COMPONENT_REFThese nodes represent non-static data member accesses. The firstoperand is the object (rather than a pointer to it); the second operandis theFIELD_DECL for the data member. The third operand representsthe byte offset of the field, but should not be used directly; callcomponent_ref_field_offset instead.
ADDR_EXPRThese nodes are used to represent the address of an object. (Theseexpressions will always have pointer or reference type.) The operand maybe another expression, or it may be a declaration.
As an extension, GCC allows users to take the address of a label. Inthis case, the operand of theADDR_EXPR will be aLABEL_DECL. The type of such an expression isvoid*.
If the object addressed is not an lvalue, a temporary is created, andthe address of the temporary is used.
INDIRECT_REFThese nodes are used to represent the object pointed to by a pointer.The operand is the pointer being dereferenced; it will always havepointer or reference type.
MEM_REFThese nodes are used to represent the object pointed to by a pointeroffset by a constant.The first operand is the pointer being dereferenced; it will always havepointer or reference type. The second operand is a pointer constantserving as constant offset applied to the pointer being dereferencedwith its type specifying the type to be used for type-based alias analysis.The type of the node specifies the alignment of the access.
TARGET_MEM_REFThese nodes represent memory accesses whose address directly map toan addressing mode of the target architecture. The first argumentisTMR_BASE and is a pointer to the object being accessed.The second argument isTMR_OFFSET which is a pointer constantwith dual purpose serving both as constant offset and holder ofthe type used for type-based alias analysis. The first two operandshave exactly the same semantics asMEM_REF. The thirdand fourth operand areTMR_INDEX andTMR_STEP wherethe former is an integer and the latter an integer constant. Thefifth and last operand isTMR_INDEX2 which is an alternatenon-constant offset. Any of the third to last operands may beNULL if the corresponding component does not appear inthe address, butTMR_INDEX andTMR_STEP shall bealways supplied in pair. The Address of theTARGET_MEM_REFis determined in the following way.
TMR_BASE + TMR_OFFSET + TMR_INDEX * TMR_STEP + TMR_INDEX2
The type of the node specifies the alignment of the access.
Next:Unary and Binary Expressions, Previous:Constant expressions, Up:Expressions [Contents][Index]