xref: /netbsd-src/external/gpl3/gcc.old/dist/gcc/tree.def (revision 8feb0f0b7eaff0608f8350bbfa3098827b4bb91b)
11debfc3dSmrg/* This file contains the definitions and documentation for the
21debfc3dSmrg   tree codes used in GCC.
3*8feb0f0bSmrg   Copyright (C) 1987-2020 Free Software Foundation, Inc.
41debfc3dSmrg
51debfc3dSmrgThis file is part of GCC.
61debfc3dSmrg
71debfc3dSmrgGCC is free software; you can redistribute it and/or modify it under
81debfc3dSmrgthe terms of the GNU General Public License as published by the Free
91debfc3dSmrgSoftware Foundation; either version 3, or (at your option) any later
101debfc3dSmrgversion.
111debfc3dSmrg
121debfc3dSmrgGCC is distributed in the hope that it will be useful, but WITHOUT ANY
131debfc3dSmrgWARRANTY; without even the implied warranty of MERCHANTABILITY or
141debfc3dSmrgFITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
151debfc3dSmrgfor more details.
161debfc3dSmrg
171debfc3dSmrgYou should have received a copy of the GNU General Public License
181debfc3dSmrgalong with GCC; see the file COPYING3.  If not see
191debfc3dSmrg<http://www.gnu.org/licenses/>.  */
201debfc3dSmrg
211debfc3dSmrg
221debfc3dSmrg/* For tcc_references, tcc_expression, tcc_comparison, tcc_unary,
231debfc3dSmrg   tcc_binary, and tcc_statement nodes, which use struct tree_exp, the
241debfc3dSmrg   4th element is the number of argument slots to allocate.  This
251debfc3dSmrg   determines the size of the tree node object.  Other nodes use
261debfc3dSmrg   different structures, and the size is determined by the tree_union
271debfc3dSmrg   member structure; the 4th element should be zero.  Languages that
281debfc3dSmrg   define language-specific tcc_exceptional or tcc_constant codes must
291debfc3dSmrg   define the tree_size langhook to say how big they are.
301debfc3dSmrg
311debfc3dSmrg   These tree codes have been sorted so that the macros in tree.h that
321debfc3dSmrg   check for various tree codes are optimized into range checks.  This
331debfc3dSmrg   gives a measurable performance improvement.  When adding a new
34c0a68be4Smrg   code, consider its placement in relation to the other codes.  */
351debfc3dSmrg
361debfc3dSmrg/* Any erroneous construct is parsed into a node of this type.
371debfc3dSmrg   This type of node is accepted without complaint in all contexts
381debfc3dSmrg   by later parsing activities, to avoid multiple error messages
391debfc3dSmrg   for one error.
401debfc3dSmrg   No fields in these nodes are used except the TREE_CODE.  */
411debfc3dSmrgDEFTREECODE (ERROR_MARK, "error_mark", tcc_exceptional, 0)
421debfc3dSmrg
431debfc3dSmrg/* Used to represent a name (such as, in the DECL_NAME of a decl node).
441debfc3dSmrg   Internally it looks like a STRING_CST node.
451debfc3dSmrg   There is only one IDENTIFIER_NODE ever made for any particular name.
461debfc3dSmrg   Use `get_identifier' to get it (or create it, the first time).  */
471debfc3dSmrgDEFTREECODE (IDENTIFIER_NODE, "identifier_node", tcc_exceptional, 0)
481debfc3dSmrg
491debfc3dSmrg/* Has the TREE_VALUE and TREE_PURPOSE fields.  */
501debfc3dSmrg/* These nodes are made into lists by chaining through the
511debfc3dSmrg   TREE_CHAIN field.  The elements of the list live in the
521debfc3dSmrg   TREE_VALUE fields, while TREE_PURPOSE fields are occasionally
531debfc3dSmrg   used as well to get the effect of Lisp association lists.  */
541debfc3dSmrgDEFTREECODE (TREE_LIST, "tree_list", tcc_exceptional, 0)
551debfc3dSmrg
561debfc3dSmrg/* These nodes contain an array of tree nodes.  */
571debfc3dSmrgDEFTREECODE (TREE_VEC, "tree_vec", tcc_exceptional, 0)
581debfc3dSmrg
591debfc3dSmrg/* A symbol binding block.  These are arranged in a tree,
601debfc3dSmrg   where the BLOCK_SUBBLOCKS field contains a chain of subblocks
611debfc3dSmrg   chained through the BLOCK_CHAIN field.
621debfc3dSmrg   BLOCK_SUPERCONTEXT points to the parent block.
631debfc3dSmrg     For a block which represents the outermost scope of a function, it
641debfc3dSmrg     points to the FUNCTION_DECL node.
651debfc3dSmrg   BLOCK_VARS points to a chain of decl nodes.
661debfc3dSmrg   BLOCK_CHAIN points to the next BLOCK at the same level.
671debfc3dSmrg   BLOCK_ABSTRACT_ORIGIN points to the original (abstract) tree node which
681debfc3dSmrg   this block is an instance of, or else is NULL to indicate that this
691debfc3dSmrg   block is not an instance of anything else.  When non-NULL, the value
701debfc3dSmrg   could either point to another BLOCK node or it could point to a
711debfc3dSmrg   FUNCTION_DECL node (e.g. in the case of a block representing the
721debfc3dSmrg   outermost scope of a particular inlining of a function).
731debfc3dSmrg   TREE_ASM_WRITTEN is nonzero if the block was actually referenced
741debfc3dSmrg   in the generated assembly.  */
751debfc3dSmrgDEFTREECODE (BLOCK, "block", tcc_exceptional, 0)
761debfc3dSmrg
771debfc3dSmrg/* Each data type is represented by a tree node whose code is one of
781debfc3dSmrg   the following:  */
791debfc3dSmrg/* Each node that represents a data type has a component TYPE_SIZE
80*8feb0f0bSmrg   that evaluates either to a tree that is a (potentially non-constant)
81*8feb0f0bSmrg   expression representing the type size in bits, or to a null pointer
82*8feb0f0bSmrg   when the size of the type is unknown (for example, for incomplete
83*8feb0f0bSmrg   types such as arrays of unspecified bound).
841debfc3dSmrg   The TYPE_MODE contains the machine mode for values of this type.
851debfc3dSmrg   The TYPE_POINTER_TO field contains a type for a pointer to this type,
861debfc3dSmrg     or zero if no such has been created yet.
871debfc3dSmrg   The TYPE_NEXT_VARIANT field is used to chain together types
881debfc3dSmrg     that are variants made by type modifiers such as "const" and "volatile".
891debfc3dSmrg   The TYPE_MAIN_VARIANT field, in any member of such a chain,
901debfc3dSmrg     points to the start of the chain.
911debfc3dSmrg   The TYPE_NAME field contains info on the name used in the program
921debfc3dSmrg     for this type (for GDB symbol table output).  It is either a
931debfc3dSmrg     TYPE_DECL node, for types that are typedefs, or an IDENTIFIER_NODE
941debfc3dSmrg     in the case of structs, unions or enums that are known with a tag,
951debfc3dSmrg     or zero for types that have no special name.
961debfc3dSmrg   The TYPE_CONTEXT for any sort of type which could have a name or
971debfc3dSmrg    which could have named members (e.g. tagged types in C/C++) will
981debfc3dSmrg    point to the node which represents the scope of the given type, or
991debfc3dSmrg    will be NULL_TREE if the type has "file scope".  For most types, this
1001debfc3dSmrg    will point to a BLOCK node or a FUNCTION_DECL node, but it could also
1011debfc3dSmrg    point to a FUNCTION_TYPE node (for types whose scope is limited to the
1021debfc3dSmrg    formal parameter list of some function type specification) or it
1031debfc3dSmrg    could point to a RECORD_TYPE, UNION_TYPE or QUAL_UNION_TYPE node
1041debfc3dSmrg    (for C++ "member" types).
1051debfc3dSmrg    For non-tagged-types, TYPE_CONTEXT need not be set to anything in
1061debfc3dSmrg    particular, since any type which is of some type category  (e.g.
1071debfc3dSmrg    an array type or a function type) which cannot either have a name
1081debfc3dSmrg    itself or have named members doesn't really have a "scope" per se.
1091debfc3dSmrg  The TYPE_STUB_DECL field is used as a forward-references to names for
1101debfc3dSmrg    ENUMERAL_TYPE, RECORD_TYPE, UNION_TYPE, and QUAL_UNION_TYPE nodes;
111a2dc1f3fSmrg    see below.  */
1121debfc3dSmrg
1131debfc3dSmrg/* The ordering of the following codes is optimized for the checking
1141debfc3dSmrg   macros in tree.h.  Changing the order will degrade the speed of the
1151debfc3dSmrg   compiler.  OFFSET_TYPE, ENUMERAL_TYPE, BOOLEAN_TYPE, INTEGER_TYPE,
1161debfc3dSmrg   REAL_TYPE, POINTER_TYPE.  */
1171debfc3dSmrg
1181debfc3dSmrg/* An offset is a pointer relative to an object.
1191debfc3dSmrg   The TREE_TYPE field is the type of the object at the offset.
1201debfc3dSmrg   The TYPE_OFFSET_BASETYPE points to the node for the type of object
1211debfc3dSmrg   that the offset is relative to.  */
1221debfc3dSmrgDEFTREECODE (OFFSET_TYPE, "offset_type", tcc_type, 0)
1231debfc3dSmrg
1241debfc3dSmrg/* C enums.  The type node looks just like an INTEGER_TYPE node.
1251debfc3dSmrg   The symbols for the values of the enum type are defined by
1261debfc3dSmrg   CONST_DECL nodes, but the type does not point to them;
1271debfc3dSmrg   however, the TYPE_VALUES is a list in which each element's TREE_PURPOSE
1281debfc3dSmrg   is a name and the TREE_VALUE is the value (an INTEGER_CST node).  */
1291debfc3dSmrg/* A forward reference `enum foo' when no enum named foo is defined yet
1301debfc3dSmrg   has zero (a null pointer) in its TYPE_SIZE.  The tag name is in
1311debfc3dSmrg   the TYPE_NAME field.  If the type is later defined, the normal
1321debfc3dSmrg   fields are filled in.
1331debfc3dSmrg   RECORD_TYPE, UNION_TYPE, and QUAL_UNION_TYPE forward refs are
1341debfc3dSmrg   treated similarly.  */
1351debfc3dSmrgDEFTREECODE (ENUMERAL_TYPE, "enumeral_type", tcc_type, 0)
1361debfc3dSmrg
1371debfc3dSmrg/* Boolean type (true or false are the only values).  Looks like an
1381debfc3dSmrg   INTEGRAL_TYPE.  */
1391debfc3dSmrgDEFTREECODE (BOOLEAN_TYPE, "boolean_type", tcc_type, 0)
1401debfc3dSmrg
1411debfc3dSmrg/* Integer types in all languages, including char in C.
1421debfc3dSmrg   Also used for sub-ranges of other discrete types.
1431debfc3dSmrg   Has components TYPE_MIN_VALUE, TYPE_MAX_VALUE (expressions, inclusive)
144c0a68be4Smrg   and TYPE_PRECISION (number of bits used by this type).  */
1451debfc3dSmrgDEFTREECODE (INTEGER_TYPE, "integer_type", tcc_type, 0)
1461debfc3dSmrg
1471debfc3dSmrg/* C's float and double.  Different floating types are distinguished
1481debfc3dSmrg   by machine mode and by the TYPE_SIZE and the TYPE_PRECISION.  */
1491debfc3dSmrgDEFTREECODE (REAL_TYPE, "real_type", tcc_type, 0)
1501debfc3dSmrg
1511debfc3dSmrg/* The ordering of the following codes is optimized for the checking
1521debfc3dSmrg   macros in tree.h.  Changing the order will degrade the speed of the
1531debfc3dSmrg   compiler.  POINTER_TYPE, REFERENCE_TYPE.  Note that this range
1541debfc3dSmrg   overlaps the previous range of ordered types.  */
1551debfc3dSmrg
1561debfc3dSmrg/* All pointer-to-x types have code POINTER_TYPE.
1571debfc3dSmrg   The TREE_TYPE points to the node for the type pointed to.  */
1581debfc3dSmrgDEFTREECODE (POINTER_TYPE, "pointer_type", tcc_type, 0)
1591debfc3dSmrg
1601debfc3dSmrg/* A reference is like a pointer except that it is coerced
1611debfc3dSmrg   automatically to the value it points to.  Used in C++.  */
1621debfc3dSmrgDEFTREECODE (REFERENCE_TYPE, "reference_type", tcc_type, 0)
1631debfc3dSmrg
1641debfc3dSmrg/* The C++ decltype(nullptr) type.  */
1651debfc3dSmrgDEFTREECODE (NULLPTR_TYPE, "nullptr_type", tcc_type, 0)
1661debfc3dSmrg
1671debfc3dSmrg/* _Fract and _Accum types in Embedded-C.  Different fixed-point types
1681debfc3dSmrg   are distinguished by machine mode and by the TYPE_SIZE and the
1691debfc3dSmrg   TYPE_PRECISION.  */
1701debfc3dSmrgDEFTREECODE (FIXED_POINT_TYPE, "fixed_point_type", tcc_type, 0)
1711debfc3dSmrg
1721debfc3dSmrg/* The ordering of the following codes is optimized for the checking
1731debfc3dSmrg   macros in tree.h.  Changing the order will degrade the speed of the
1741debfc3dSmrg   compiler.  COMPLEX_TYPE, VECTOR_TYPE, ARRAY_TYPE.  */
1751debfc3dSmrg
1761debfc3dSmrg/* Complex number types.  The TREE_TYPE field is the data type
1771debfc3dSmrg   of the real and imaginary parts.  It must be of scalar
1781debfc3dSmrg   arithmetic type, not including pointer type.  */
1791debfc3dSmrgDEFTREECODE (COMPLEX_TYPE, "complex_type", tcc_type, 0)
1801debfc3dSmrg
1811debfc3dSmrg/* Vector types.  The TREE_TYPE field is the data type of the vector
1821debfc3dSmrg   elements.  The TYPE_PRECISION field is the number of subparts of
1831debfc3dSmrg   the vector.  */
1841debfc3dSmrgDEFTREECODE (VECTOR_TYPE, "vector_type", tcc_type, 0)
1851debfc3dSmrg
1861debfc3dSmrg/* The ordering of the following codes is optimized for the checking
1871debfc3dSmrg   macros in tree.h.  Changing the order will degrade the speed of the
1881debfc3dSmrg   compiler.  ARRAY_TYPE, RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE.
1891debfc3dSmrg   Note that this range overlaps the previous range.  */
1901debfc3dSmrg
1911debfc3dSmrg/* Types of arrays.  Special fields:
1921debfc3dSmrg   TREE_TYPE		  Type of an array element.
1931debfc3dSmrg   TYPE_DOMAIN		  Type to index by.
1941debfc3dSmrg			    Its range of values specifies the array length.
1951debfc3dSmrg The field TYPE_POINTER_TO (TREE_TYPE (array_type)) is always nonzero
1961debfc3dSmrg and holds the type to coerce a value of that array type to in C.
1971debfc3dSmrg TYPE_STRING_FLAG indicates a string (in contrast to an array of chars)
1981debfc3dSmrg in languages (such as Chill) that make a distinction.  */
199c0a68be4Smrg/* Array types in C */
2001debfc3dSmrgDEFTREECODE (ARRAY_TYPE, "array_type", tcc_type, 0)
2011debfc3dSmrg
202c0a68be4Smrg/* Struct in C.  */
2031debfc3dSmrg/* Special fields:
2041debfc3dSmrg   TYPE_FIELDS  chain of FIELD_DECLs for the fields of the struct,
205a2dc1f3fSmrg     VAR_DECLs, TYPE_DECLs and CONST_DECLs for record-scope variables,
206a2dc1f3fSmrg     types and enumerators and FUNCTION_DECLs for methods associated
207c0a68be4Smrg     with the type.  */
2081debfc3dSmrg/* See the comment above, before ENUMERAL_TYPE, for how
2091debfc3dSmrg   forward references to struct tags are handled in C.  */
2101debfc3dSmrgDEFTREECODE (RECORD_TYPE, "record_type", tcc_type, 0)
2111debfc3dSmrg
2121debfc3dSmrg/* Union in C.  Like a struct, except that the offsets of the fields
2131debfc3dSmrg   will all be zero.  */
2141debfc3dSmrg/* See the comment above, before ENUMERAL_TYPE, for how
2151debfc3dSmrg   forward references to union tags are handled in C.  */
2161debfc3dSmrgDEFTREECODE (UNION_TYPE, "union_type", tcc_type, 0)	/* C union type */
2171debfc3dSmrg
2181debfc3dSmrg/* Similar to UNION_TYPE, except that the expressions in DECL_QUALIFIER
2191debfc3dSmrg   in each FIELD_DECL determine what the union contains.  The first
2201debfc3dSmrg   field whose DECL_QUALIFIER expression is true is deemed to occupy
2211debfc3dSmrg   the union.  */
2221debfc3dSmrgDEFTREECODE (QUAL_UNION_TYPE, "qual_union_type", tcc_type, 0)
2231debfc3dSmrg
2241debfc3dSmrg/* The ordering of the following codes is optimized for the checking
2251debfc3dSmrg   macros in tree.h.  Changing the order will degrade the speed of the
2261debfc3dSmrg   compiler.  VOID_TYPE, FUNCTION_TYPE, METHOD_TYPE.  */
2271debfc3dSmrg
2281debfc3dSmrg/* The void type in C */
2291debfc3dSmrgDEFTREECODE (VOID_TYPE, "void_type", tcc_type, 0)
2301debfc3dSmrg
2311debfc3dSmrg/* Type of functions.  Special fields:
2321debfc3dSmrg   TREE_TYPE		    type of value returned.
2331debfc3dSmrg   TYPE_ARG_TYPES      list of types of arguments expected.
2341debfc3dSmrg	this list is made of TREE_LIST nodes.
2351debfc3dSmrg	In this list TREE_PURPOSE can be used to indicate the default
2361debfc3dSmrg	value of parameter (used by C++ frontend).
2371debfc3dSmrg   Types of "Procedures" in languages where they are different from functions
2381debfc3dSmrg   have code FUNCTION_TYPE also, but then TREE_TYPE is zero or void type.  */
2391debfc3dSmrgDEFTREECODE (FUNCTION_TYPE, "function_type", tcc_type, 0)
2401debfc3dSmrg
2411debfc3dSmrg/* METHOD_TYPE is the type of a function which takes an extra first
2421debfc3dSmrg   argument for "self", which is not present in the declared argument list.
2431debfc3dSmrg   The TREE_TYPE is the return type of the method.  The TYPE_METHOD_BASETYPE
2441debfc3dSmrg   is the type of "self".  TYPE_ARG_TYPES is the real argument list, which
2451debfc3dSmrg   includes the hidden argument for "self".  */
2461debfc3dSmrgDEFTREECODE (METHOD_TYPE, "method_type", tcc_type, 0)
2471debfc3dSmrg
2481debfc3dSmrg/* This is a language-specific kind of type.
2491debfc3dSmrg   Its meaning is defined by the language front end.
2501debfc3dSmrg   layout_type does not know how to lay this out,
2511debfc3dSmrg   so the front-end must do so manually.  */
2521debfc3dSmrgDEFTREECODE (LANG_TYPE, "lang_type", tcc_type, 0)
2531debfc3dSmrg
2541debfc3dSmrg/* Expressions */
2551debfc3dSmrg
2561debfc3dSmrg/* First, the constants.  */
2571debfc3dSmrg
2581debfc3dSmrgDEFTREECODE (VOID_CST, "void_cst", tcc_constant, 0)
2591debfc3dSmrg
2601debfc3dSmrg/* Contents are in an array of HOST_WIDE_INTs.
2611debfc3dSmrg
2621debfc3dSmrg   We often access these constants both in their native precision and
2631debfc3dSmrg   in wider precisions (with the constant being implicitly extended
2641debfc3dSmrg   according to TYPE_SIGN).  In each case, the useful part of the array
2651debfc3dSmrg   may be as wide as the precision requires but may be shorter when all
2661debfc3dSmrg   of the upper bits are sign bits.  The length of the array when accessed
2671debfc3dSmrg   in the constant's native precision is given by TREE_INT_CST_NUNITS.
2681debfc3dSmrg   The length of the array when accessed in wider precisions is given
2691debfc3dSmrg   by TREE_INT_CST_EXT_NUNITS.  Each element can be obtained using
2701debfc3dSmrg   TREE_INT_CST_ELT.
2711debfc3dSmrg
2721debfc3dSmrg   INTEGER_CST nodes can be shared, and therefore should be considered
2731debfc3dSmrg   read only.  They should be copied before setting a flag such as
2741debfc3dSmrg   TREE_OVERFLOW.  If an INTEGER_CST has TREE_OVERFLOW already set,
2751debfc3dSmrg   it is known to be unique.  INTEGER_CST nodes are created for the
2761debfc3dSmrg   integral types, for pointer types and for vector and float types in
2771debfc3dSmrg   some circumstances.  */
2781debfc3dSmrgDEFTREECODE (INTEGER_CST, "integer_cst", tcc_constant, 0)
2791debfc3dSmrg
280a2dc1f3fSmrg/* Contents are given by POLY_INT_CST_COEFF.  */
281a2dc1f3fSmrgDEFTREECODE (POLY_INT_CST, "poly_int_cst", tcc_constant, 0)
282a2dc1f3fSmrg
2831debfc3dSmrg/* Contents are in TREE_REAL_CST field.  */
2841debfc3dSmrgDEFTREECODE (REAL_CST, "real_cst", tcc_constant, 0)
2851debfc3dSmrg
2861debfc3dSmrg/* Contents are in TREE_FIXED_CST field.  */
2871debfc3dSmrgDEFTREECODE (FIXED_CST, "fixed_cst", tcc_constant, 0)
2881debfc3dSmrg
2891debfc3dSmrg/* Contents are in TREE_REALPART and TREE_IMAGPART fields,
2901debfc3dSmrg   whose contents are other constant nodes.  */
2911debfc3dSmrgDEFTREECODE (COMPLEX_CST, "complex_cst", tcc_constant, 0)
2921debfc3dSmrg
293a2dc1f3fSmrg/* See generic.texi for details.  */
2941debfc3dSmrgDEFTREECODE (VECTOR_CST, "vector_cst", tcc_constant, 0)
2951debfc3dSmrg
2961debfc3dSmrg/* Contents are TREE_STRING_LENGTH and the actual contents of the string.  */
2971debfc3dSmrgDEFTREECODE (STRING_CST, "string_cst", tcc_constant, 0)
2981debfc3dSmrg
2991debfc3dSmrg/* Declarations.  All references to names are represented as ..._DECL
3001debfc3dSmrg   nodes.  The decls in one binding context are chained through the
3011debfc3dSmrg   TREE_CHAIN field.  Each DECL has a DECL_NAME field which contains
3021debfc3dSmrg   an IDENTIFIER_NODE.  (Some decls, most often labels, may have zero
3031debfc3dSmrg   as the DECL_NAME).  DECL_CONTEXT points to the node representing
3041debfc3dSmrg   the context in which this declaration has its scope.  For
3051debfc3dSmrg   FIELD_DECLs, this is the RECORD_TYPE, UNION_TYPE, or
3061debfc3dSmrg   QUAL_UNION_TYPE node that the field is a member of.  For VAR_DECL,
3071debfc3dSmrg   PARM_DECL, FUNCTION_DECL, LABEL_DECL, and CONST_DECL nodes, this
3081debfc3dSmrg   points to either the FUNCTION_DECL for the containing function, the
3091debfc3dSmrg   RECORD_TYPE or UNION_TYPE for the containing type, or NULL_TREE or
3101debfc3dSmrg   a TRANSLATION_UNIT_DECL if the given decl has "file scope".
3111debfc3dSmrg   DECL_ABSTRACT_ORIGIN, if non-NULL, points to the original (abstract)
3121debfc3dSmrg    ..._DECL node of which this decl is an (inlined or template expanded)
3131debfc3dSmrg    instance.
3141debfc3dSmrg   The TREE_TYPE field holds the data type of the object, when relevant.
3151debfc3dSmrg    LABEL_DECLs have no data type.  For TYPE_DECL, the TREE_TYPE field
3161debfc3dSmrg    contents are the type whose name is being declared.
3171debfc3dSmrg   The DECL_ALIGN, DECL_SIZE,
3181debfc3dSmrg    and DECL_MODE fields exist in decl nodes just as in type nodes.
3191debfc3dSmrg    They are unused in LABEL_DECL, TYPE_DECL and CONST_DECL nodes.
3201debfc3dSmrg
3211debfc3dSmrg   DECL_FIELD_BIT_OFFSET holds an integer number of bits offset for
3221debfc3dSmrg   the location.  DECL_VOFFSET holds an expression for a variable
3231debfc3dSmrg   offset; it is to be multiplied by DECL_VOFFSET_UNIT (an integer).
3241debfc3dSmrg   These fields are relevant only in FIELD_DECLs and PARM_DECLs.
3251debfc3dSmrg
3261debfc3dSmrg   DECL_INITIAL holds the value to initialize a variable to,
3271debfc3dSmrg   or the value of a constant.  For a function, it holds the body
3281debfc3dSmrg   (a node of type BLOCK representing the function's binding contour
3291debfc3dSmrg   and whose body contains the function's statements.)  For a LABEL_DECL
3301debfc3dSmrg   in C, it is a flag, nonzero if the label's definition has been seen.
3311debfc3dSmrg
3321debfc3dSmrg   PARM_DECLs use a special field:
3331debfc3dSmrg   DECL_ARG_TYPE is the type in which the argument is actually
3341debfc3dSmrg    passed, which may be different from its type within the function.
3351debfc3dSmrg
3361debfc3dSmrg   FUNCTION_DECLs use four special fields:
3371debfc3dSmrg   DECL_ARGUMENTS holds a chain of PARM_DECL nodes for the arguments.
3381debfc3dSmrg   DECL_RESULT holds a RESULT_DECL node for the value of a function.
3391debfc3dSmrg    The DECL_RTL field is 0 for a function that returns no value.
3401debfc3dSmrg    (C functions returning void have zero here.)
3411debfc3dSmrg    The TREE_TYPE field is the type in which the result is actually
3421debfc3dSmrg    returned.  This is usually the same as the return type of the
3431debfc3dSmrg    FUNCTION_DECL, but it may be a wider integer type because of
3441debfc3dSmrg    promotion.
3451debfc3dSmrg   DECL_FUNCTION_CODE is a code number that is nonzero for
3461debfc3dSmrg    built-in functions.  Its value is an enum built_in_function
3471debfc3dSmrg    that says which built-in function it is.
3481debfc3dSmrg
3491debfc3dSmrg   DECL_SOURCE_FILE holds a filename string and DECL_SOURCE_LINE
3501debfc3dSmrg   holds a line number.  In some cases these can be the location of
3511debfc3dSmrg   a reference, if no definition has been seen.
3521debfc3dSmrg
3531debfc3dSmrg   DECL_ABSTRACT is nonzero if the decl represents an abstract instance
3541debfc3dSmrg   of a decl (i.e. one which is nested within an abstract instance of a
3551debfc3dSmrg   inline function.  */
3561debfc3dSmrg
3571debfc3dSmrgDEFTREECODE (FUNCTION_DECL, "function_decl", tcc_declaration, 0)
3581debfc3dSmrgDEFTREECODE (LABEL_DECL, "label_decl", tcc_declaration, 0)
3591debfc3dSmrg/* The ordering of the following codes is optimized for the checking
3601debfc3dSmrg   macros in tree.h.  Changing the order will degrade the speed of the
3611debfc3dSmrg   compiler.  FIELD_DECL, VAR_DECL, CONST_DECL, PARM_DECL,
3621debfc3dSmrg   TYPE_DECL.  */
3631debfc3dSmrgDEFTREECODE (FIELD_DECL, "field_decl", tcc_declaration, 0)
3641debfc3dSmrgDEFTREECODE (VAR_DECL, "var_decl", tcc_declaration, 0)
3651debfc3dSmrgDEFTREECODE (CONST_DECL, "const_decl", tcc_declaration, 0)
3661debfc3dSmrgDEFTREECODE (PARM_DECL, "parm_decl", tcc_declaration, 0)
3671debfc3dSmrgDEFTREECODE (TYPE_DECL, "type_decl", tcc_declaration, 0)
3681debfc3dSmrgDEFTREECODE (RESULT_DECL, "result_decl", tcc_declaration, 0)
3691debfc3dSmrg
3701debfc3dSmrg/* A "declaration" of a debug temporary.  It should only appear in
3711debfc3dSmrg   DEBUG stmts.  */
3721debfc3dSmrgDEFTREECODE (DEBUG_EXPR_DECL, "debug_expr_decl", tcc_declaration, 0)
3731debfc3dSmrg
374a2dc1f3fSmrg/* A stmt that marks the beginning of a source statement.  */
375a2dc1f3fSmrgDEFTREECODE (DEBUG_BEGIN_STMT, "debug_begin_stmt", tcc_statement, 0)
376a2dc1f3fSmrg
3771debfc3dSmrg/* A namespace declaration.  Namespaces appear in DECL_CONTEXT of other
3781debfc3dSmrg   _DECLs, providing a hierarchy of names.  */
3791debfc3dSmrgDEFTREECODE (NAMESPACE_DECL, "namespace_decl", tcc_declaration, 0)
3801debfc3dSmrg
3811debfc3dSmrg/* A declaration import.
3821debfc3dSmrg   The C++ FE uses this to represent a using-directive; eg:
3831debfc3dSmrg   "using namespace foo".
3841debfc3dSmrg   But it could be used to represent any declaration import construct.
3851debfc3dSmrg   Whenever a declaration import appears in a lexical block, the BLOCK node
3861debfc3dSmrg   representing that lexical block in GIMPLE will contain an IMPORTED_DECL
3871debfc3dSmrg   node, linked via BLOCK_VARS accessor of the said BLOCK.
3881debfc3dSmrg   For a given NODE which code is IMPORTED_DECL,
3891debfc3dSmrg   IMPORTED_DECL_ASSOCIATED_DECL (NODE) accesses the imported declaration.  */
3901debfc3dSmrgDEFTREECODE (IMPORTED_DECL, "imported_decl", tcc_declaration, 0)
3911debfc3dSmrg
3921debfc3dSmrg/* A namelist declaration.
3931debfc3dSmrg   The Fortran FE uses this to represent a namelist statement, e.g.:
3941debfc3dSmrg   NAMELIST /namelist-group-name/ namelist-group-object-list.
3951debfc3dSmrg   Whenever a declaration import appears in a lexical block, the BLOCK node
3961debfc3dSmrg   representing that lexical block in GIMPLE will contain an NAMELIST_DECL
3971debfc3dSmrg   node, linked via BLOCK_VARS accessor of the said BLOCK.
3981debfc3dSmrg   For a given NODE which code is NAMELIST_DECL,
3991debfc3dSmrg   NAMELIST_DECL_ASSOCIATED_DECL (NODE) accesses the imported declaration.  */
4001debfc3dSmrgDEFTREECODE (NAMELIST_DECL, "namelist_decl", tcc_declaration, 0)
4011debfc3dSmrg
4021debfc3dSmrg/* A translation unit.  This is not technically a declaration, since it
4031debfc3dSmrg   can't be looked up, but it's close enough.  */
4041debfc3dSmrgDEFTREECODE (TRANSLATION_UNIT_DECL, "translation_unit_decl",\
4051debfc3dSmrg	     tcc_declaration, 0)
4061debfc3dSmrg
4071debfc3dSmrg/* References to storage.  */
4081debfc3dSmrg
4091debfc3dSmrg/* The ordering of the following codes is optimized for the classification
4101debfc3dSmrg   in handled_component_p.  Keep them in a consecutive group.  */
4111debfc3dSmrg
4121debfc3dSmrg/* Value is structure or union component.
4131debfc3dSmrg   Operand 0 is the structure or union (an expression).
4141debfc3dSmrg   Operand 1 is the field (a node of type FIELD_DECL).
4151debfc3dSmrg   Operand 2, if present, is the value of DECL_FIELD_OFFSET, measured
4161debfc3dSmrg   in units of DECL_OFFSET_ALIGN / BITS_PER_UNIT.  */
4171debfc3dSmrgDEFTREECODE (COMPONENT_REF, "component_ref", tcc_reference, 3)
4181debfc3dSmrg
4191debfc3dSmrg/* Reference to a group of bits within an object.  Similar to COMPONENT_REF
4201debfc3dSmrg   except the position is given explicitly rather than via a FIELD_DECL.
4211debfc3dSmrg   Operand 0 is the structure or union expression;
4221debfc3dSmrg   operand 1 is a tree giving the constant number of bits being referenced;
4231debfc3dSmrg   operand 2 is a tree giving the constant position of the first referenced bit.
4241debfc3dSmrg   The result type width has to match the number of bits referenced.
4251debfc3dSmrg   If the result type is integral, its signedness specifies how it is extended
4261debfc3dSmrg   to its mode width.  */
4271debfc3dSmrgDEFTREECODE (BIT_FIELD_REF, "bit_field_ref", tcc_reference, 3)
4281debfc3dSmrg
4291debfc3dSmrg/* Array indexing.
4301debfc3dSmrg   Operand 0 is the array; operand 1 is a (single) array index.
4311debfc3dSmrg   Operand 2, if present, is a copy of TYPE_MIN_VALUE of the index.
4321debfc3dSmrg   Operand 3, if present, is the element size, measured in units of
4331debfc3dSmrg   the alignment of the element type.  */
4341debfc3dSmrgDEFTREECODE (ARRAY_REF, "array_ref", tcc_reference, 4)
4351debfc3dSmrg
4361debfc3dSmrg/* Likewise, except that the result is a range ("slice") of the array.  The
4371debfc3dSmrg   starting index of the resulting array is taken from operand 1 and the size
4381debfc3dSmrg   of the range is taken from the type of the expression.  */
4391debfc3dSmrgDEFTREECODE (ARRAY_RANGE_REF, "array_range_ref", tcc_reference, 4)
4401debfc3dSmrg
4411debfc3dSmrg/* Used only on an operand of complex type, these return
4421debfc3dSmrg   a value of the corresponding component type.  */
4431debfc3dSmrgDEFTREECODE (REALPART_EXPR, "realpart_expr", tcc_reference, 1)
4441debfc3dSmrgDEFTREECODE (IMAGPART_EXPR, "imagpart_expr", tcc_reference, 1)
4451debfc3dSmrg
4461debfc3dSmrg/* Represents viewing something of one type as being of a second type.
4471debfc3dSmrg   This corresponds to an "Unchecked Conversion" in Ada and roughly to
4481debfc3dSmrg   the idiom *(type2 *)&X in C.  The only operand is the value to be
4491debfc3dSmrg   viewed as being of another type.  It is undefined if the type of the
4501debfc3dSmrg   input and of the expression have different sizes.
4511debfc3dSmrg
4521debfc3dSmrg   This code may also be used within the LHS of a MODIFY_EXPR, in which
4531debfc3dSmrg   case no actual data motion may occur.  TREE_ADDRESSABLE will be set in
4541debfc3dSmrg   this case and GCC must abort if it could not do the operation without
4551debfc3dSmrg   generating insns.  */
4561debfc3dSmrgDEFTREECODE (VIEW_CONVERT_EXPR, "view_convert_expr", tcc_reference, 1)
4571debfc3dSmrg
458c0a68be4Smrg/* C unary `*'.  One operand, an expression for a pointer.  */
4591debfc3dSmrgDEFTREECODE (INDIRECT_REF, "indirect_ref", tcc_reference, 1)
4601debfc3dSmrg
4611debfc3dSmrg/* Used to represent lookup in a virtual method table which is dependent on
4621debfc3dSmrg   the runtime type of an object.  Operands are:
4631debfc3dSmrg   OBJ_TYPE_REF_EXPR: An expression that evaluates the value to use.
4641debfc3dSmrg   OBJ_TYPE_REF_OBJECT: Is the object on whose behalf the lookup is
4651debfc3dSmrg   being performed.  Through this the optimizers may be able to statically
4661debfc3dSmrg   determine the dynamic type of the object.
4671debfc3dSmrg   OBJ_TYPE_REF_TOKEN: An integer index to the virtual method table.  */
4681debfc3dSmrgDEFTREECODE (OBJ_TYPE_REF, "obj_type_ref", tcc_expression, 3)
4691debfc3dSmrg
4701debfc3dSmrg/* Used to represent the brace-enclosed initializers for a structure or an
4711debfc3dSmrg   array.  It contains a sequence of component values made out of a VEC of
4721debfc3dSmrg   constructor_elt.
4731debfc3dSmrg
4741debfc3dSmrg   For RECORD_TYPE, UNION_TYPE, or QUAL_UNION_TYPE:
4751debfc3dSmrg   The field INDEX of each constructor_elt is a FIELD_DECL.
4761debfc3dSmrg
4771debfc3dSmrg   For ARRAY_TYPE:
4781debfc3dSmrg   The field INDEX of each constructor_elt is the corresponding index.
4791debfc3dSmrg   If the index is a RANGE_EXPR, it is a short-hand for many nodes,
4801debfc3dSmrg   one for each index in the range.  (If the corresponding field VALUE
4811debfc3dSmrg   has side-effects, they are evaluated once for each element.  Wrap the
4821debfc3dSmrg   value in a SAVE_EXPR if you want to evaluate side effects only once.)
4831debfc3dSmrg
4841debfc3dSmrg   Components that aren't present are cleared as per the C semantics,
4851debfc3dSmrg   unless the CONSTRUCTOR_NO_CLEARING flag is set, in which case their
4861debfc3dSmrg   value becomes undefined.  */
4871debfc3dSmrgDEFTREECODE (CONSTRUCTOR, "constructor", tcc_exceptional, 0)
4881debfc3dSmrg
4891debfc3dSmrg/* The expression types are mostly straightforward, with the fourth argument
4901debfc3dSmrg   of DEFTREECODE saying how many operands there are.
4911debfc3dSmrg   Unless otherwise specified, the operands are expressions and the
4921debfc3dSmrg   types of all the operands and the expression must all be the same.  */
4931debfc3dSmrg
4941debfc3dSmrg/* Contains two expressions to compute, one followed by the other.
4951debfc3dSmrg   the first value is ignored.  The second one's value is used.  The
4961debfc3dSmrg   type of the first expression need not agree with the other types.  */
4971debfc3dSmrgDEFTREECODE (COMPOUND_EXPR, "compound_expr", tcc_expression, 2)
4981debfc3dSmrg
4991debfc3dSmrg/* Assignment expression.  Operand 0 is the what to set; 1, the new value.  */
5001debfc3dSmrgDEFTREECODE (MODIFY_EXPR, "modify_expr", tcc_expression, 2)
5011debfc3dSmrg
5021debfc3dSmrg/* Initialization expression.  Operand 0 is the variable to initialize;
5031debfc3dSmrg   Operand 1 is the initializer.  This differs from MODIFY_EXPR in that any
5041debfc3dSmrg   reference to the referent of operand 0 within operand 1 is undefined.  */
5051debfc3dSmrgDEFTREECODE (INIT_EXPR, "init_expr", tcc_expression, 2)
5061debfc3dSmrg
5071debfc3dSmrg/* For TARGET_EXPR, operand 0 is the target of an initialization,
5081debfc3dSmrg   operand 1 is the initializer for the target, which may be void
5091debfc3dSmrg     if simply expanding it initializes the target.
5101debfc3dSmrg   operand 2 is the cleanup for this node, if any.
5111debfc3dSmrg   operand 3 is the saved initializer after this node has been
5121debfc3dSmrg   expanded once; this is so we can re-expand the tree later.  */
5131debfc3dSmrgDEFTREECODE (TARGET_EXPR, "target_expr", tcc_expression, 4)
5141debfc3dSmrg
5151debfc3dSmrg/* Conditional expression ( ... ? ... : ...  in C).
5161debfc3dSmrg   Operand 0 is the condition.
5171debfc3dSmrg   Operand 1 is the then-value.
5181debfc3dSmrg   Operand 2 is the else-value.
5191debfc3dSmrg   Operand 0 may be of any type.
5201debfc3dSmrg   Operand 1 must have the same type as the entire expression, unless
5211debfc3dSmrg   it unconditionally throws an exception, in which case it should
5221debfc3dSmrg   have VOID_TYPE.  The same constraints apply to operand 2.  The
5231debfc3dSmrg   condition in operand 0 must be of integral type.
5241debfc3dSmrg
5251debfc3dSmrg   In cfg gimple, if you do not have a selection expression, operands
5261debfc3dSmrg   1 and 2 are NULL.  The operands are then taken from the cfg edges. */
5271debfc3dSmrgDEFTREECODE (COND_EXPR, "cond_expr", tcc_expression, 3)
5281debfc3dSmrg
529a2dc1f3fSmrg/* Represents a vector in which every element is equal to operand 0.  */
530a2dc1f3fSmrgDEFTREECODE (VEC_DUPLICATE_EXPR, "vec_duplicate_expr", tcc_unary, 1)
531a2dc1f3fSmrg
532a2dc1f3fSmrg/* Vector series created from a start (base) value and a step.
533a2dc1f3fSmrg
534a2dc1f3fSmrg   A = VEC_SERIES_EXPR (B, C)
535a2dc1f3fSmrg
536a2dc1f3fSmrg   means
537a2dc1f3fSmrg
538a2dc1f3fSmrg   for (i = 0; i < N; i++)
539a2dc1f3fSmrg     A[i] = B + C * i;  */
540a2dc1f3fSmrgDEFTREECODE (VEC_SERIES_EXPR, "vec_series_expr", tcc_binary, 2)
541a2dc1f3fSmrg
5421debfc3dSmrg/* Vector conditional expression. It is like COND_EXPR, but with
5431debfc3dSmrg   vector operands.
5441debfc3dSmrg
5451debfc3dSmrg   A = VEC_COND_EXPR ( X < Y, B, C)
5461debfc3dSmrg
5471debfc3dSmrg   means
5481debfc3dSmrg
5491debfc3dSmrg   for (i=0; i<N; i++)
5501debfc3dSmrg     A[i] = X[i] < Y[i] ? B[i] : C[i];
5511debfc3dSmrg*/
5521debfc3dSmrgDEFTREECODE (VEC_COND_EXPR, "vec_cond_expr", tcc_expression, 3)
5531debfc3dSmrg
5541debfc3dSmrg/* Vector permutation expression.  A = VEC_PERM_EXPR<v0, v1, mask> means
5551debfc3dSmrg
5561debfc3dSmrg   N = length(mask)
5571debfc3dSmrg   foreach i in N:
5581debfc3dSmrg     M = mask[i] % (2*N)
5591debfc3dSmrg     A = M < N ? v0[M] : v1[M-N]
5601debfc3dSmrg
5611debfc3dSmrg   V0 and V1 are vectors of the same type.  MASK is an integer-typed
5621debfc3dSmrg   vector.  The number of MASK elements must be the same with the
5631debfc3dSmrg   number of elements in V0 and V1.  The size of the inner type
5641debfc3dSmrg   of the MASK and of the V0 and V1 must be the same.
5651debfc3dSmrg*/
5661debfc3dSmrgDEFTREECODE (VEC_PERM_EXPR, "vec_perm_expr", tcc_expression, 3)
5671debfc3dSmrg
5681debfc3dSmrg/* Declare local variables, including making RTL and allocating space.
5691debfc3dSmrg   BIND_EXPR_VARS is a chain of VAR_DECL nodes for the variables.
5701debfc3dSmrg   BIND_EXPR_BODY is the body, the expression to be computed using
5711debfc3dSmrg   the variables.  The value of operand 1 becomes that of the BIND_EXPR.
5721debfc3dSmrg   BIND_EXPR_BLOCK is the BLOCK that corresponds to these bindings
5731debfc3dSmrg   for debugging purposes.  If this BIND_EXPR is actually expanded,
5741debfc3dSmrg   that sets the TREE_USED flag in the BLOCK.
5751debfc3dSmrg
5761debfc3dSmrg   The BIND_EXPR is not responsible for informing parsers
5771debfc3dSmrg   about these variables.  If the body is coming from the input file,
5781debfc3dSmrg   then the code that creates the BIND_EXPR is also responsible for
5791debfc3dSmrg   informing the parser of the variables.
5801debfc3dSmrg
5811debfc3dSmrg   If the BIND_EXPR is ever expanded, its TREE_USED flag is set.
5821debfc3dSmrg   This tells the code for debugging symbol tables not to ignore the BIND_EXPR.
5831debfc3dSmrg   If the BIND_EXPR should be output for debugging but will not be expanded,
5841debfc3dSmrg   set the TREE_USED flag by hand.
5851debfc3dSmrg
5861debfc3dSmrg   In order for the BIND_EXPR to be known at all, the code that creates it
5871debfc3dSmrg   must also install it as a subblock in the tree of BLOCK
5881debfc3dSmrg   nodes for the function.  */
5891debfc3dSmrgDEFTREECODE (BIND_EXPR, "bind_expr", tcc_expression, 3)
5901debfc3dSmrg
5911debfc3dSmrg/* Function call.  CALL_EXPRs are represented by variably-sized expression
5921debfc3dSmrg   nodes.  There are at least three fixed operands.  Operand 0 is an
5931debfc3dSmrg   INTEGER_CST node containing the total operand count, the number of
5941debfc3dSmrg   arguments plus 3.  Operand 1 is the function or NULL, while operand 2 is
5951debfc3dSmrg   is static chain argument, or NULL.  The remaining operands are the
5961debfc3dSmrg   arguments to the call.  */
5971debfc3dSmrgDEFTREECODE (CALL_EXPR, "call_expr", tcc_vl_exp, 3)
5981debfc3dSmrg
5991debfc3dSmrg/* Specify a value to compute along with its corresponding cleanup.
6001debfc3dSmrg   Operand 0 is the cleanup expression.
6011debfc3dSmrg   The cleanup is executed by the first enclosing CLEANUP_POINT_EXPR,
6021debfc3dSmrg   which must exist.  This differs from TRY_CATCH_EXPR in that operand 1
6031debfc3dSmrg   is always evaluated when cleanups are run.  */
6041debfc3dSmrgDEFTREECODE (WITH_CLEANUP_EXPR, "with_cleanup_expr", tcc_expression, 1)
6051debfc3dSmrg
6061debfc3dSmrg/* Specify a cleanup point.
6071debfc3dSmrg   Operand 0 is an expression that may have cleanups.  If it does, those
6081debfc3dSmrg   cleanups are executed after the expression is expanded.
6091debfc3dSmrg
6101debfc3dSmrg   Note that if the expression is a reference to storage, it is forced out
6111debfc3dSmrg   of memory before the cleanups are run.  This is necessary to handle
6121debfc3dSmrg   cases where the cleanups modify the storage referenced; in the
6131debfc3dSmrg   expression 't.i', if 't' is a struct with an integer member 'i' and a
6141debfc3dSmrg   cleanup which modifies 'i', the value of the expression depends on
6151debfc3dSmrg   whether the cleanup is run before or after 't.i' is evaluated.  When
6161debfc3dSmrg   expand_expr is run on 't.i', it returns a MEM.  This is not good enough;
6171debfc3dSmrg   the value of 't.i' must be forced out of memory.
6181debfc3dSmrg
6191debfc3dSmrg   As a consequence, the operand of a CLEANUP_POINT_EXPR must not have
6201debfc3dSmrg   BLKmode, because it will not be forced out of memory.  */
6211debfc3dSmrgDEFTREECODE (CLEANUP_POINT_EXPR, "cleanup_point_expr", tcc_expression, 1)
6221debfc3dSmrg
6231debfc3dSmrg/* The following code is used in languages that have types where some
6241debfc3dSmrg   field in an object of the type contains a value that is used in the
6251debfc3dSmrg   computation of another field's offset or size and/or the size of the
6261debfc3dSmrg   type.  The positions and/or sizes of fields can vary from object to
6271debfc3dSmrg   object of the same type or even for one and the same object within
6281debfc3dSmrg   its scope.
6291debfc3dSmrg
630c0a68be4Smrg   Record types with discriminants in Ada are
6311debfc3dSmrg   examples of such types.  This mechanism is also used to create "fat
6321debfc3dSmrg   pointers" for unconstrained array types in Ada; the fat pointer is a
6331debfc3dSmrg   structure one of whose fields is a pointer to the actual array type
6341debfc3dSmrg   and the other field is a pointer to a template, which is a structure
6351debfc3dSmrg   containing the bounds of the array.  The bounds in the type pointed
6361debfc3dSmrg   to by the first field in the fat pointer refer to the values in the
6371debfc3dSmrg   template.
6381debfc3dSmrg
6391debfc3dSmrg   When you wish to construct such a type you need "self-references"
6401debfc3dSmrg   that allow you to reference the object having this type from the
6411debfc3dSmrg   TYPE node, i.e. without having a variable instantiating this type.
6421debfc3dSmrg
6431debfc3dSmrg   Such a "self-references" is done using a PLACEHOLDER_EXPR.  This is
6441debfc3dSmrg   a node that will later be replaced with the object being referenced.
6451debfc3dSmrg   Its type is that of the object and selects which object to use from
6461debfc3dSmrg   a chain of references (see below).  No other slots are used in the
6471debfc3dSmrg   PLACEHOLDER_EXPR.
6481debfc3dSmrg
6491debfc3dSmrg   For example, if your type FOO is a RECORD_TYPE with a field BAR,
6501debfc3dSmrg   and you need the value of <variable>.BAR to calculate TYPE_SIZE
6511debfc3dSmrg   (FOO), just substitute <variable> above with a PLACEHOLDER_EXPR
6521debfc3dSmrg   whose TREE_TYPE is FOO.  Then construct your COMPONENT_REF with
6531debfc3dSmrg   the PLACEHOLDER_EXPR as the first operand (which has the correct
6541debfc3dSmrg   type).  Later, when the size is needed in the program, the back-end
6551debfc3dSmrg   will find this PLACEHOLDER_EXPR and generate code to calculate the
6561debfc3dSmrg   actual size at run-time.  In the following, we describe how this
6571debfc3dSmrg   calculation is done.
6581debfc3dSmrg
6591debfc3dSmrg   When we wish to evaluate a size or offset, we check whether it contains a
6601debfc3dSmrg   PLACEHOLDER_EXPR.  If it does, we call substitute_placeholder_in_expr
6611debfc3dSmrg   passing both that tree and an expression within which the object may be
6621debfc3dSmrg   found.  The latter expression is the object itself in the simple case of
6631debfc3dSmrg   an Ada record with discriminant, but it can be the array in the case of an
6641debfc3dSmrg   unconstrained array.
6651debfc3dSmrg
6661debfc3dSmrg   In the latter case, we need the fat pointer, because the bounds of
6671debfc3dSmrg   the array can only be accessed from it.  However, we rely here on the
6681debfc3dSmrg   fact that the expression for the array contains the dereference of
6691debfc3dSmrg   the fat pointer that obtained the array pointer.  */
6701debfc3dSmrg
6711debfc3dSmrg/* Denotes a record to later be substituted before evaluating this expression.
6721debfc3dSmrg   The type of this expression is used to find the record to replace it.  */
6731debfc3dSmrgDEFTREECODE (PLACEHOLDER_EXPR, "placeholder_expr", tcc_exceptional, 0)
6741debfc3dSmrg
6751debfc3dSmrg/* Simple arithmetic.  */
6761debfc3dSmrgDEFTREECODE (PLUS_EXPR, "plus_expr", tcc_binary, 2)
6771debfc3dSmrgDEFTREECODE (MINUS_EXPR, "minus_expr", tcc_binary, 2)
6781debfc3dSmrgDEFTREECODE (MULT_EXPR, "mult_expr", tcc_binary, 2)
6791debfc3dSmrg
6801debfc3dSmrg/* Pointer addition.  The first operand is always a pointer and the
6811debfc3dSmrg   second operand is an integer of type sizetype.  */
6821debfc3dSmrgDEFTREECODE (POINTER_PLUS_EXPR, "pointer_plus_expr", tcc_binary, 2)
6831debfc3dSmrg
684a2dc1f3fSmrg/* Pointer subtraction.  The two arguments are pointers, and the result
685a2dc1f3fSmrg   is a signed integer of the same precision.  Pointers are interpreted
686a2dc1f3fSmrg   as unsigned, the difference is computed as if in infinite signed
687a2dc1f3fSmrg   precision.  Behavior is undefined if the difference does not fit in
688a2dc1f3fSmrg   the result type.  The result does not depend on the pointer type,
689a2dc1f3fSmrg   it is not divided by the size of the pointed-to type.  */
690a2dc1f3fSmrgDEFTREECODE (POINTER_DIFF_EXPR, "pointer_diff_expr", tcc_binary, 2)
691a2dc1f3fSmrg
6921debfc3dSmrg/* Highpart multiplication.  For an integral type with precision B,
6931debfc3dSmrg   returns bits [2B-1, B] of the full 2*B product.  */
6941debfc3dSmrgDEFTREECODE (MULT_HIGHPART_EXPR, "mult_highpart_expr", tcc_binary, 2)
6951debfc3dSmrg
6961debfc3dSmrg/* Division for integer result that rounds the quotient toward zero.  */
6971debfc3dSmrgDEFTREECODE (TRUNC_DIV_EXPR, "trunc_div_expr", tcc_binary, 2)
6981debfc3dSmrg
6991debfc3dSmrg/* Division for integer result that rounds it toward plus infinity.  */
7001debfc3dSmrgDEFTREECODE (CEIL_DIV_EXPR, "ceil_div_expr", tcc_binary, 2)
7011debfc3dSmrg
7021debfc3dSmrg/* Division for integer result that rounds it toward minus infinity.  */
7031debfc3dSmrgDEFTREECODE (FLOOR_DIV_EXPR, "floor_div_expr", tcc_binary, 2)
7041debfc3dSmrg
7051debfc3dSmrg/* Division for integer result that rounds it toward nearest integer.  */
7061debfc3dSmrgDEFTREECODE (ROUND_DIV_EXPR, "round_div_expr", tcc_binary, 2)
7071debfc3dSmrg
7081debfc3dSmrg/* Four kinds of remainder that go with the four kinds of division:  */
7091debfc3dSmrg
7101debfc3dSmrg/* The sign of the remainder is that of the dividend.  */
7111debfc3dSmrgDEFTREECODE (TRUNC_MOD_EXPR, "trunc_mod_expr", tcc_binary, 2)
7121debfc3dSmrg
7131debfc3dSmrg/* The sign of the remainder is the opposite of that of the divisor.  */
7141debfc3dSmrgDEFTREECODE (CEIL_MOD_EXPR, "ceil_mod_expr", tcc_binary, 2)
7151debfc3dSmrg
7161debfc3dSmrg/* The sign of the remainder is that of the divisor.  */
7171debfc3dSmrgDEFTREECODE (FLOOR_MOD_EXPR, "floor_mod_expr", tcc_binary, 2)
7181debfc3dSmrg
7191debfc3dSmrg/* The sign of the remainder is not predictable.  */
7201debfc3dSmrgDEFTREECODE (ROUND_MOD_EXPR, "round_mod_expr", tcc_binary, 2)
7211debfc3dSmrg
7221debfc3dSmrg/* Division for real result.  */
7231debfc3dSmrgDEFTREECODE (RDIV_EXPR, "rdiv_expr", tcc_binary, 2)
7241debfc3dSmrg
7251debfc3dSmrg/* Division which is not supposed to need rounding.
7261debfc3dSmrg   Used for pointer subtraction in C.  */
7271debfc3dSmrgDEFTREECODE (EXACT_DIV_EXPR, "exact_div_expr", tcc_binary, 2)
7281debfc3dSmrg
7291debfc3dSmrg/* Conversion of real to fixed point by truncation.  */
7301debfc3dSmrgDEFTREECODE (FIX_TRUNC_EXPR, "fix_trunc_expr", tcc_unary, 1)
7311debfc3dSmrg
7321debfc3dSmrg/* Conversion of an integer to a real.  */
7331debfc3dSmrgDEFTREECODE (FLOAT_EXPR, "float_expr", tcc_unary, 1)
7341debfc3dSmrg
7351debfc3dSmrg/* Unary negation.  */
7361debfc3dSmrgDEFTREECODE (NEGATE_EXPR, "negate_expr", tcc_unary, 1)
7371debfc3dSmrg
7381debfc3dSmrg/* Minimum and maximum values.  When used with floating point, if both
7391debfc3dSmrg   operands are zeros, or if either operand is NaN, then it is unspecified
7401debfc3dSmrg   which of the two operands is returned as the result.  */
7411debfc3dSmrgDEFTREECODE (MIN_EXPR, "min_expr", tcc_binary, 2)
7421debfc3dSmrgDEFTREECODE (MAX_EXPR, "max_expr", tcc_binary, 2)
7431debfc3dSmrg
7441debfc3dSmrg/* Represents the absolute value of the operand.
7451debfc3dSmrg
7461debfc3dSmrg   An ABS_EXPR must have either an INTEGER_TYPE or a REAL_TYPE.  The
7471debfc3dSmrg   operand of the ABS_EXPR must have the same type.  */
7481debfc3dSmrgDEFTREECODE (ABS_EXPR, "abs_expr", tcc_unary, 1)
7491debfc3dSmrg
750c0a68be4Smrg/* Represents the unsigned absolute value of the operand.
751c0a68be4Smrg   An ABSU_EXPR must have unsigned INTEGER_TYPE.  The operand of the ABSU_EXPR
752c0a68be4Smrg   must have the corresponding signed type.  */
753c0a68be4SmrgDEFTREECODE (ABSU_EXPR, "absu_expr", tcc_unary, 1)
754c0a68be4Smrg
7551debfc3dSmrg/* Shift operations for shift and rotate.
7561debfc3dSmrg   Shift means logical shift if done on an
7571debfc3dSmrg   unsigned type, arithmetic shift if done on a signed type.
7581debfc3dSmrg   The second operand is the number of bits to
7591debfc3dSmrg   shift by; it need not be the same type as the first operand and result.
7601debfc3dSmrg   Note that the result is undefined if the second operand is larger
7611debfc3dSmrg   than or equal to the first operand's type size.
7621debfc3dSmrg
7631debfc3dSmrg   The first operand of a shift can have either an integer or a
7641debfc3dSmrg   (non-integer) fixed-point type.  We follow the ISO/IEC TR 18037:2004
7651debfc3dSmrg   semantics for the latter.
7661debfc3dSmrg
7671debfc3dSmrg   Rotates are defined for integer types only.  */
7681debfc3dSmrgDEFTREECODE (LSHIFT_EXPR, "lshift_expr", tcc_binary, 2)
7691debfc3dSmrgDEFTREECODE (RSHIFT_EXPR, "rshift_expr", tcc_binary, 2)
7701debfc3dSmrgDEFTREECODE (LROTATE_EXPR, "lrotate_expr", tcc_binary, 2)
7711debfc3dSmrgDEFTREECODE (RROTATE_EXPR, "rrotate_expr", tcc_binary, 2)
7721debfc3dSmrg
7731debfc3dSmrg/* Bitwise operations.  Operands have same mode as result.  */
7741debfc3dSmrgDEFTREECODE (BIT_IOR_EXPR, "bit_ior_expr", tcc_binary, 2)
7751debfc3dSmrgDEFTREECODE (BIT_XOR_EXPR, "bit_xor_expr", tcc_binary, 2)
7761debfc3dSmrgDEFTREECODE (BIT_AND_EXPR, "bit_and_expr", tcc_binary, 2)
7771debfc3dSmrgDEFTREECODE (BIT_NOT_EXPR, "bit_not_expr", tcc_unary, 1)
7781debfc3dSmrg
7791debfc3dSmrg/* ANDIF and ORIF allow the second operand not to be computed if the
7801debfc3dSmrg   value of the expression is determined from the first operand.  AND,
7811debfc3dSmrg   OR, and XOR always compute the second operand whether its value is
7821debfc3dSmrg   needed or not (for side effects).  The operand may have
7831debfc3dSmrg   BOOLEAN_TYPE or INTEGER_TYPE.  In either case, the argument will be
7841debfc3dSmrg   either zero or one.  For example, a TRUTH_NOT_EXPR will never have
7851debfc3dSmrg   an INTEGER_TYPE VAR_DECL as its argument; instead, a NE_EXPR will be
7861debfc3dSmrg   used to compare the VAR_DECL to zero, thereby obtaining a node with
7871debfc3dSmrg   value zero or one.  */
7881debfc3dSmrgDEFTREECODE (TRUTH_ANDIF_EXPR, "truth_andif_expr", tcc_expression, 2)
7891debfc3dSmrgDEFTREECODE (TRUTH_ORIF_EXPR, "truth_orif_expr", tcc_expression, 2)
7901debfc3dSmrgDEFTREECODE (TRUTH_AND_EXPR, "truth_and_expr", tcc_expression, 2)
7911debfc3dSmrgDEFTREECODE (TRUTH_OR_EXPR, "truth_or_expr", tcc_expression, 2)
7921debfc3dSmrgDEFTREECODE (TRUTH_XOR_EXPR, "truth_xor_expr", tcc_expression, 2)
7931debfc3dSmrgDEFTREECODE (TRUTH_NOT_EXPR, "truth_not_expr", tcc_expression, 1)
7941debfc3dSmrg
7951debfc3dSmrg/* Relational operators.
796*8feb0f0bSmrg   EQ_EXPR and NE_EXPR are allowed for any types.  The others, except for
797*8feb0f0bSmrg   LTGT_EXPR, are allowed only for integral, floating-point and vector types.
798*8feb0f0bSmrg   LTGT_EXPR is allowed only for floating-point types.
799*8feb0f0bSmrg   For floating-point operators, if either operand is a NaN, then NE_EXPR
800*8feb0f0bSmrg   returns true and the remaining operators return false.  The operators
801*8feb0f0bSmrg   other than EQ_EXPR and NE_EXPR may generate an exception on quiet NaNs.
8021debfc3dSmrg   In all cases the operands will have the same type,
8031debfc3dSmrg   and the value is either the type used by the language for booleans
8041debfc3dSmrg   or an integer vector type of the same size and with the same number
8051debfc3dSmrg   of elements as the comparison operands.  True for a vector of
8061debfc3dSmrg   comparison results has all bits set while false is equal to zero.  */
8071debfc3dSmrgDEFTREECODE (LT_EXPR, "lt_expr", tcc_comparison, 2)
8081debfc3dSmrgDEFTREECODE (LE_EXPR, "le_expr", tcc_comparison, 2)
8091debfc3dSmrgDEFTREECODE (GT_EXPR, "gt_expr", tcc_comparison, 2)
8101debfc3dSmrgDEFTREECODE (GE_EXPR, "ge_expr", tcc_comparison, 2)
811*8feb0f0bSmrgDEFTREECODE (LTGT_EXPR, "ltgt_expr", tcc_comparison, 2)
8121debfc3dSmrgDEFTREECODE (EQ_EXPR, "eq_expr", tcc_comparison, 2)
8131debfc3dSmrgDEFTREECODE (NE_EXPR, "ne_expr", tcc_comparison, 2)
8141debfc3dSmrg
815*8feb0f0bSmrg/* Additional relational operators for floating-point unordered.  */
8161debfc3dSmrgDEFTREECODE (UNORDERED_EXPR, "unordered_expr", tcc_comparison, 2)
8171debfc3dSmrgDEFTREECODE (ORDERED_EXPR, "ordered_expr", tcc_comparison, 2)
8181debfc3dSmrg
8191debfc3dSmrg/* These are equivalent to unordered or ...  */
8201debfc3dSmrgDEFTREECODE (UNLT_EXPR, "unlt_expr", tcc_comparison, 2)
8211debfc3dSmrgDEFTREECODE (UNLE_EXPR, "unle_expr", tcc_comparison, 2)
8221debfc3dSmrgDEFTREECODE (UNGT_EXPR, "ungt_expr", tcc_comparison, 2)
8231debfc3dSmrgDEFTREECODE (UNGE_EXPR, "unge_expr", tcc_comparison, 2)
8241debfc3dSmrgDEFTREECODE (UNEQ_EXPR, "uneq_expr", tcc_comparison, 2)
8251debfc3dSmrg
8261debfc3dSmrgDEFTREECODE (RANGE_EXPR, "range_expr", tcc_binary, 2)
8271debfc3dSmrg
8281debfc3dSmrg/* Represents a re-association barrier for floating point expressions
8291debfc3dSmrg   like explicit parenthesis in fortran.  */
8301debfc3dSmrgDEFTREECODE (PAREN_EXPR, "paren_expr", tcc_unary, 1)
8311debfc3dSmrg
8321debfc3dSmrg/* Represents a conversion of type of a value.
8331debfc3dSmrg   All conversions, including implicit ones, must be
8341debfc3dSmrg   represented by CONVERT_EXPR or NOP_EXPR nodes.  */
8351debfc3dSmrgDEFTREECODE (CONVERT_EXPR, "convert_expr", tcc_unary, 1)
8361debfc3dSmrg
8371debfc3dSmrg/* Conversion of a pointer value to a pointer to a different
8381debfc3dSmrg   address space.  */
8391debfc3dSmrgDEFTREECODE (ADDR_SPACE_CONVERT_EXPR, "addr_space_convert_expr", tcc_unary, 1)
8401debfc3dSmrg
8411debfc3dSmrg/* Conversion of a fixed-point value to an integer, a real, or a fixed-point
8421debfc3dSmrg   value.  Or conversion of a fixed-point value from an integer, a real, or
8431debfc3dSmrg   a fixed-point value.  */
8441debfc3dSmrgDEFTREECODE (FIXED_CONVERT_EXPR, "fixed_convert_expr", tcc_unary, 1)
8451debfc3dSmrg
8461debfc3dSmrg/* Represents a conversion expected to require no code to be generated.  */
8471debfc3dSmrgDEFTREECODE (NOP_EXPR, "nop_expr", tcc_unary, 1)
8481debfc3dSmrg
8491debfc3dSmrg/* Value is same as argument, but guaranteed not an lvalue.  */
8501debfc3dSmrgDEFTREECODE (NON_LVALUE_EXPR, "non_lvalue_expr", tcc_unary, 1)
8511debfc3dSmrg
8521debfc3dSmrg/* A COMPOUND_LITERAL_EXPR represents a literal that is placed in a DECL.  The
8531debfc3dSmrg   COMPOUND_LITERAL_EXPR_DECL_EXPR is the a DECL_EXPR containing the decl
8541debfc3dSmrg   for the anonymous object represented by the COMPOUND_LITERAL;
8551debfc3dSmrg   the DECL_INITIAL of that decl is the CONSTRUCTOR that initializes
8561debfc3dSmrg   the compound literal.  */
8571debfc3dSmrgDEFTREECODE (COMPOUND_LITERAL_EXPR, "compound_literal_expr", tcc_expression, 1)
8581debfc3dSmrg
8591debfc3dSmrg/* Represents something we computed once and will use multiple times.
8601debfc3dSmrg   First operand is that expression.  After it is evaluated once, it
8611debfc3dSmrg   will be replaced by the temporary variable that holds the value.  */
8621debfc3dSmrgDEFTREECODE (SAVE_EXPR, "save_expr", tcc_expression, 1)
8631debfc3dSmrg
8641debfc3dSmrg/* & in C.  Value is the address at which the operand's value resides.
8651debfc3dSmrg   Operand may have any mode.  Result mode is Pmode.  */
8661debfc3dSmrgDEFTREECODE (ADDR_EXPR, "addr_expr", tcc_expression, 1)
8671debfc3dSmrg
8681debfc3dSmrg/* Operand0 is a function constant; result is part N of a function
8691debfc3dSmrg   descriptor of type ptr_mode.  */
8701debfc3dSmrgDEFTREECODE (FDESC_EXPR, "fdesc_expr", tcc_expression, 2)
8711debfc3dSmrg
8721debfc3dSmrg/* Given a container value, a replacement value and a bit position within
8731debfc3dSmrg   the container, produce the value that results from replacing the part of
8741debfc3dSmrg   the container starting at the bit position with the replacement value.
8751debfc3dSmrg   Operand 0 is a tree for the container value of integral or vector type;
8761debfc3dSmrg   Operand 1 is a tree for the replacement value of another integral or
8771debfc3dSmrg   the vector element type;
8781debfc3dSmrg   Operand 2 is a tree giving the constant bit position;
8791debfc3dSmrg   The number of bits replaced is given by the precision of the type of the
8801debfc3dSmrg   replacement value if it is integral or by its size if it is non-integral.
8811debfc3dSmrg   ???  The reason to make the size of the replacement implicit is to avoid
8821debfc3dSmrg   introducing a quaternary operation.
8831debfc3dSmrg   The replaced bits shall be fully inside the container.  If the container
8841debfc3dSmrg   is of vector type, then these bits shall be aligned with its elements.  */
8851debfc3dSmrgDEFTREECODE (BIT_INSERT_EXPR, "bit_insert_expr", tcc_expression, 3)
8861debfc3dSmrg
8871debfc3dSmrg/* Given two real or integer operands of the same type,
8881debfc3dSmrg   returns a complex value of the corresponding complex type.  */
8891debfc3dSmrgDEFTREECODE (COMPLEX_EXPR, "complex_expr", tcc_binary, 2)
8901debfc3dSmrg
8911debfc3dSmrg/* Complex conjugate of operand.  Used only on complex types.  */
8921debfc3dSmrgDEFTREECODE (CONJ_EXPR, "conj_expr", tcc_unary, 1)
8931debfc3dSmrg
8941debfc3dSmrg/* Nodes for ++ and -- in C.
8951debfc3dSmrg   The second arg is how much to increment or decrement by.
8961debfc3dSmrg   For a pointer, it would be the size of the object pointed to.  */
8971debfc3dSmrgDEFTREECODE (PREDECREMENT_EXPR, "predecrement_expr", tcc_expression, 2)
8981debfc3dSmrgDEFTREECODE (PREINCREMENT_EXPR, "preincrement_expr", tcc_expression, 2)
8991debfc3dSmrgDEFTREECODE (POSTDECREMENT_EXPR, "postdecrement_expr", tcc_expression, 2)
9001debfc3dSmrgDEFTREECODE (POSTINCREMENT_EXPR, "postincrement_expr", tcc_expression, 2)
9011debfc3dSmrg
9021debfc3dSmrg/* Used to implement `va_arg'.  */
9031debfc3dSmrgDEFTREECODE (VA_ARG_EXPR, "va_arg_expr", tcc_expression, 1)
9041debfc3dSmrg
9051debfc3dSmrg/* Evaluate operand 0.  If and only if an exception is thrown during
9061debfc3dSmrg   the evaluation of operand 0, evaluate operand 1.
9071debfc3dSmrg
9081debfc3dSmrg   This differs from TRY_FINALLY_EXPR in that operand 1 is not evaluated
9091debfc3dSmrg   on a normal or jump exit, only on an exception.  */
9101debfc3dSmrgDEFTREECODE (TRY_CATCH_EXPR, "try_catch_expr", tcc_statement, 2)
9111debfc3dSmrg
9121debfc3dSmrg/* Evaluate the first operand.
9131debfc3dSmrg   The second operand is a cleanup expression which is evaluated
9141debfc3dSmrg   on any exit (normal, exception, or jump out) from this expression.  */
915*8feb0f0bSmrgDEFTREECODE (TRY_FINALLY_EXPR, "try_finally_expr", tcc_statement, 2)
916*8feb0f0bSmrg
917*8feb0f0bSmrg/* Evaluate either the normal or the exceptional cleanup.  This must
918*8feb0f0bSmrg   only be present as the cleanup expression in a TRY_FINALLY_EXPR.
919*8feb0f0bSmrg   If the TRY_FINALLY_EXPR completes normally, the first operand of
920*8feb0f0bSmrg   EH_ELSE_EXPR is used as a cleanup, otherwise the second operand is
921*8feb0f0bSmrg   used.  */
922*8feb0f0bSmrgDEFTREECODE (EH_ELSE_EXPR, "eh_else_expr", tcc_statement, 2)
9231debfc3dSmrg
9241debfc3dSmrg/* These types of expressions have no useful value,
9251debfc3dSmrg   and always have side effects.  */
9261debfc3dSmrg
9271debfc3dSmrg/* Used to represent a local declaration. The operand is DECL_EXPR_DECL.  */
9281debfc3dSmrgDEFTREECODE (DECL_EXPR, "decl_expr", tcc_statement, 1)
9291debfc3dSmrg
9301debfc3dSmrg/* A label definition, encapsulated as a statement.
9311debfc3dSmrg   Operand 0 is the LABEL_DECL node for the label that appears here.
9321debfc3dSmrg   The type should be void and the value should be ignored.  */
9331debfc3dSmrgDEFTREECODE (LABEL_EXPR, "label_expr", tcc_statement, 1)
9341debfc3dSmrg
9351debfc3dSmrg/* GOTO.  Operand 0 is a LABEL_DECL node or an expression.
9361debfc3dSmrg   The type should be void and the value should be ignored.  */
9371debfc3dSmrgDEFTREECODE (GOTO_EXPR, "goto_expr", tcc_statement, 1)
9381debfc3dSmrg
9391debfc3dSmrg/* RETURN.  Evaluates operand 0, then returns from the current function.
9401debfc3dSmrg   Presumably that operand is an assignment that stores into the
9411debfc3dSmrg   RESULT_DECL that hold the value to be returned.
9421debfc3dSmrg   The operand may be null.
9431debfc3dSmrg   The type should be void and the value should be ignored.  */
9441debfc3dSmrgDEFTREECODE (RETURN_EXPR, "return_expr", tcc_statement, 1)
9451debfc3dSmrg
9461debfc3dSmrg/* Exit the inner most loop conditionally.  Operand 0 is the condition.
9471debfc3dSmrg   The type should be void and the value should be ignored.  */
9481debfc3dSmrgDEFTREECODE (EXIT_EXPR, "exit_expr", tcc_statement, 1)
9491debfc3dSmrg
9501debfc3dSmrg/* A loop.  Operand 0 is the body of the loop.
9511debfc3dSmrg   It must contain an EXIT_EXPR or is an infinite loop.
9521debfc3dSmrg   The type should be void and the value should be ignored.  */
9531debfc3dSmrgDEFTREECODE (LOOP_EXPR, "loop_expr", tcc_statement, 1)
9541debfc3dSmrg
9551debfc3dSmrg/* Switch expression.
9561debfc3dSmrg
9571debfc3dSmrg   TREE_TYPE is the original type of the condition, before any
9581debfc3dSmrg   language required type conversions.  It may be NULL, in which case
9591debfc3dSmrg   the original type and final types are assumed to be the same.
9601debfc3dSmrg
9611debfc3dSmrg   Operand 0 is the expression used to perform the branch,
9621debfc3dSmrg   Operand 1 is the body of the switch, which probably contains
9631debfc3dSmrg     CASE_LABEL_EXPRs.  It may also be NULL, in which case operand 2
964a2dc1f3fSmrg     must not be NULL.  */
965a2dc1f3fSmrgDEFTREECODE (SWITCH_EXPR, "switch_expr", tcc_statement, 2)
9661debfc3dSmrg
9671debfc3dSmrg/* Used to represent a case label.
9681debfc3dSmrg
9691debfc3dSmrg   Operand 0 is CASE_LOW.  It may be NULL_TREE, in which case the label
9701debfc3dSmrg     is a 'default' label.
9711debfc3dSmrg   Operand 1 is CASE_HIGH.  If it is NULL_TREE, the label is a simple
9721debfc3dSmrg     (one-value) case label.  If it is non-NULL_TREE, the case is a range.
973*8feb0f0bSmrg   Operand 2 is CASE_LABEL, which has the corresponding LABEL_DECL.
9741debfc3dSmrg   Operand 3 is CASE_CHAIN.  This operand is only used in tree-cfg.c to
9751debfc3dSmrg     speed up the lookup of case labels which use a particular edge in
9761debfc3dSmrg     the control flow graph.  */
9771debfc3dSmrgDEFTREECODE (CASE_LABEL_EXPR, "case_label_expr", tcc_statement, 4)
9781debfc3dSmrg
9791debfc3dSmrg/* Used to represent an inline assembly statement.  ASM_STRING returns a
9801debfc3dSmrg   STRING_CST for the instruction (e.g., "mov x, y"). ASM_OUTPUTS,
9811debfc3dSmrg   ASM_INPUTS, and ASM_CLOBBERS represent the outputs, inputs, and clobbers
9821debfc3dSmrg   for the statement.  ASM_LABELS, if present, indicates various destinations
9831debfc3dSmrg   for the asm; labels cannot be combined with outputs.  */
9841debfc3dSmrgDEFTREECODE (ASM_EXPR, "asm_expr", tcc_statement, 5)
9851debfc3dSmrg
9861debfc3dSmrg/* Variable references for SSA analysis.  New SSA names are created every
9871debfc3dSmrg   time a variable is assigned a new value.  The SSA builder uses SSA_NAME
9881debfc3dSmrg   nodes to implement SSA versioning.  */
9891debfc3dSmrgDEFTREECODE (SSA_NAME, "ssa_name", tcc_exceptional, 0)
9901debfc3dSmrg
9911debfc3dSmrg/* Used to represent a typed exception handler.  CATCH_TYPES is the type (or
9921debfc3dSmrg   list of types) handled, and CATCH_BODY is the code for the handler.  */
9931debfc3dSmrgDEFTREECODE (CATCH_EXPR, "catch_expr", tcc_statement, 2)
9941debfc3dSmrg
9951debfc3dSmrg/* Used to represent an exception specification.  EH_FILTER_TYPES is a list
9961debfc3dSmrg   of allowed types, and EH_FILTER_FAILURE is an expression to evaluate on
9971debfc3dSmrg   failure.  */
9981debfc3dSmrgDEFTREECODE (EH_FILTER_EXPR, "eh_filter_expr", tcc_statement, 2)
9991debfc3dSmrg
10001debfc3dSmrg/* Node used for describing a property that is known at compile
10011debfc3dSmrg   time.  */
10021debfc3dSmrgDEFTREECODE (SCEV_KNOWN, "scev_known", tcc_expression, 0)
10031debfc3dSmrg
10041debfc3dSmrg/* Node used for describing a property that is not known at compile
10051debfc3dSmrg   time.  */
10061debfc3dSmrgDEFTREECODE (SCEV_NOT_KNOWN, "scev_not_known", tcc_expression, 0)
10071debfc3dSmrg
10081debfc3dSmrg/* Polynomial chains of recurrences.
1009a2dc1f3fSmrg   cr = {CHREC_LEFT (cr), +, CHREC_RIGHT (cr)}_CHREC_VARIABLE (cr).  */
1010a2dc1f3fSmrgDEFTREECODE (POLYNOMIAL_CHREC, "polynomial_chrec", tcc_expression, 2)
10111debfc3dSmrg
10121debfc3dSmrg/* Used to chain children of container statements together.
10131debfc3dSmrg   Use the interface in tree-iterator.h to access this node.  */
10141debfc3dSmrgDEFTREECODE (STATEMENT_LIST, "statement_list", tcc_exceptional, 0)
10151debfc3dSmrg
10161debfc3dSmrg/* Predicate assertion.  Artificial expression generated by the optimizers
10171debfc3dSmrg   to keep track of predicate values.  This expression may only appear on
10181debfc3dSmrg   the RHS of assignments.
10191debfc3dSmrg
10201debfc3dSmrg   Given X = ASSERT_EXPR <Y, EXPR>, the optimizers can infer
10211debfc3dSmrg   two things:
10221debfc3dSmrg
10231debfc3dSmrg   	1- X is a copy of Y.
10241debfc3dSmrg	2- EXPR is a conditional expression and is known to be true.
10251debfc3dSmrg
10261debfc3dSmrg   Valid and to be expected forms of conditional expressions are
10271debfc3dSmrg   valid GIMPLE conditional expressions (as defined by is_gimple_condexpr)
10281debfc3dSmrg   and conditional expressions with the first operand being a
10291debfc3dSmrg   PLUS_EXPR with a variable possibly wrapped in a NOP_EXPR first
10301debfc3dSmrg   operand and an integer constant second operand.
10311debfc3dSmrg
10321debfc3dSmrg   The type of the expression is the same as Y.  */
10331debfc3dSmrgDEFTREECODE (ASSERT_EXPR, "assert_expr", tcc_expression, 2)
10341debfc3dSmrg
10351debfc3dSmrg/* Base class information. Holds information about a class as a
10361debfc3dSmrg   baseclass of itself or another class.  */
10371debfc3dSmrgDEFTREECODE (TREE_BINFO, "tree_binfo", tcc_exceptional, 0)
10381debfc3dSmrg
10391debfc3dSmrg/* Records the size for an expression of variable size type.  This is
10401debfc3dSmrg   for use in contexts in which we are accessing the entire object,
10411debfc3dSmrg   such as for a function call, or block copy.
10421debfc3dSmrg   Operand 0 is the real expression.
10431debfc3dSmrg   Operand 1 is the size of the type in the expression.  */
10441debfc3dSmrgDEFTREECODE (WITH_SIZE_EXPR, "with_size_expr", tcc_expression, 2)
10451debfc3dSmrg
10461debfc3dSmrg/* Extract elements from two input vectors Operand 0 and Operand 1
10471debfc3dSmrg   size VS, according to the offset OFF defined by Operand 2 as
10481debfc3dSmrg   follows:
10491debfc3dSmrg   If OFF > 0, the last VS - OFF elements of vector OP0 are concatenated to
10501debfc3dSmrg   the first OFF elements of the vector OP1.
10511debfc3dSmrg   If OFF == 0, then the returned vector is OP1.
10521debfc3dSmrg   On different targets OFF may take different forms; It can be an address, in
10531debfc3dSmrg   which case its low log2(VS)-1 bits define the offset, or it can be a mask
10541debfc3dSmrg   generated by the builtin targetm.vectorize.mask_for_load_builtin_decl.  */
10551debfc3dSmrgDEFTREECODE (REALIGN_LOAD_EXPR, "realign_load", tcc_expression, 3)
10561debfc3dSmrg
10571debfc3dSmrg/* Low-level memory addressing.  Operands are BASE (address of static or
10581debfc3dSmrg   global variable or register), OFFSET (integer constant),
10591debfc3dSmrg   INDEX (register), STEP (integer constant), INDEX2 (register),
10601debfc3dSmrg   The corresponding address is BASE + STEP * INDEX + INDEX2 + OFFSET.
10611debfc3dSmrg   Only variations and values valid on the target are allowed.
10621debfc3dSmrg
10631debfc3dSmrg   The type of STEP, INDEX and INDEX2 is sizetype.
10641debfc3dSmrg
10651debfc3dSmrg   The type of BASE is a pointer type.  If BASE is not an address of
10661debfc3dSmrg   a static or global variable INDEX2 will be NULL.
10671debfc3dSmrg
10681debfc3dSmrg   The type of OFFSET is a pointer type and determines TBAA the same as
10691debfc3dSmrg   the constant offset operand in MEM_REF.  */
10701debfc3dSmrg
10711debfc3dSmrgDEFTREECODE (TARGET_MEM_REF, "target_mem_ref", tcc_reference, 5)
10721debfc3dSmrg
10731debfc3dSmrg/* Memory addressing.  Operands are a pointer and a tree constant integer
10741debfc3dSmrg   byte offset of the pointer type that when dereferenced yields the
10751debfc3dSmrg   type of the base object the pointer points into and which is used for
10761debfc3dSmrg   TBAA purposes.
10771debfc3dSmrg   The type of the MEM_REF is the type the bytes at the memory location
10781debfc3dSmrg   are interpreted as.
10791debfc3dSmrg   MEM_REF <p, c> is equivalent to ((typeof(c))p)->x... where x... is a
10801debfc3dSmrg   chain of component references offsetting p by c.  */
10811debfc3dSmrgDEFTREECODE (MEM_REF, "mem_ref", tcc_reference, 2)
10821debfc3dSmrg
10831debfc3dSmrg/* OpenACC and OpenMP.  As it is exposed in TREE_RANGE_CHECK invocations, do
10841debfc3dSmrg   not change the ordering of these codes.  */
10851debfc3dSmrg
10861debfc3dSmrg/* OpenACC - #pragma acc parallel [clause1 ... clauseN]
10871debfc3dSmrg   Operand 0: OMP_BODY: Code to be executed in parallel.
10881debfc3dSmrg   Operand 1: OMP_CLAUSES: List of clauses.  */
10891debfc3dSmrg
10901debfc3dSmrgDEFTREECODE (OACC_PARALLEL, "oacc_parallel", tcc_statement, 2)
10911debfc3dSmrg
10921debfc3dSmrg/* OpenACC - #pragma acc kernels [clause1 ... clauseN]
10931debfc3dSmrg   Operand 0: OMP_BODY: Sequence of kernels.
10941debfc3dSmrg   Operand 1: OMP_CLAUSES: List of clauses.  */
10951debfc3dSmrg
10961debfc3dSmrgDEFTREECODE (OACC_KERNELS, "oacc_kernels", tcc_statement, 2)
10971debfc3dSmrg
1098*8feb0f0bSmrg/* OpenACC - #pragma acc serial [clause1 ... clauseN]
1099*8feb0f0bSmrg   Operand 0: OMP_BODY: Code to be executed sequentially.
1100*8feb0f0bSmrg   Operand 1: OMP_CLAUSES: List of clauses.  */
1101*8feb0f0bSmrg
1102*8feb0f0bSmrgDEFTREECODE (OACC_SERIAL, "oacc_serial", tcc_statement, 2)
1103*8feb0f0bSmrg
11041debfc3dSmrg/* OpenACC - #pragma acc data [clause1 ... clauseN]
11051debfc3dSmrg   Operand 0: OACC_DATA_BODY: Data construct body.
11061debfc3dSmrg   Operand 1: OACC_DATA_CLAUSES: List of clauses.  */
11071debfc3dSmrg
11081debfc3dSmrgDEFTREECODE (OACC_DATA, "oacc_data", tcc_statement, 2)
11091debfc3dSmrg
11101debfc3dSmrg/* OpenACC - #pragma acc host_data [clause1 ... clauseN]
11111debfc3dSmrg   Operand 0: OACC_HOST_DATA_BODY: Host_data construct body.
11121debfc3dSmrg   Operand 1: OACC_HOST_DATA_CLAUSES: List of clauses.  */
11131debfc3dSmrg
11141debfc3dSmrgDEFTREECODE (OACC_HOST_DATA, "oacc_host_data", tcc_statement, 2)
11151debfc3dSmrg
11161debfc3dSmrg/* OpenMP - #pragma omp parallel [clause1 ... clauseN]
11171debfc3dSmrg   Operand 0: OMP_PARALLEL_BODY: Code to be executed by all threads.
11181debfc3dSmrg   Operand 1: OMP_PARALLEL_CLAUSES: List of clauses.  */
11191debfc3dSmrg
11201debfc3dSmrgDEFTREECODE (OMP_PARALLEL, "omp_parallel", tcc_statement, 2)
11211debfc3dSmrg
11221debfc3dSmrg/* OpenMP - #pragma omp task [clause1 ... clauseN]
11231debfc3dSmrg   Operand 0: OMP_TASK_BODY: Code to be executed by all threads.
11241debfc3dSmrg   Operand 1: OMP_TASK_CLAUSES: List of clauses.  */
11251debfc3dSmrg
11261debfc3dSmrgDEFTREECODE (OMP_TASK, "omp_task", tcc_statement, 2)
11271debfc3dSmrg
11281debfc3dSmrg/* OpenMP - #pragma omp for [clause1 ... clauseN]
11291debfc3dSmrg   Operand 0: OMP_FOR_BODY: Loop body.
11301debfc3dSmrg   Operand 1: OMP_FOR_CLAUSES: List of clauses.
11311debfc3dSmrg   Operand 2: OMP_FOR_INIT: Initialization code of the form
11321debfc3dSmrg                             	VAR = N1.
11331debfc3dSmrg   Operand 3: OMP_FOR_COND: Loop conditional expression of the form
11341debfc3dSmrg                             	VAR { <, >, <=, >= } N2.
11351debfc3dSmrg   Operand 4: OMP_FOR_INCR: Loop index increment of the form
11361debfc3dSmrg			     	VAR { +=, -= } INCR.
11371debfc3dSmrg   Operand 5: OMP_FOR_PRE_BODY: Filled by the gimplifier with things
11381debfc3dSmrg	from INIT, COND, and INCR that are technically part of the
11391debfc3dSmrg	OMP_FOR structured block, but are evaluated before the loop
11401debfc3dSmrg	body begins.
11411debfc3dSmrg   Operand 6: OMP_FOR_ORIG_DECLS: If non-NULL, list of DECLs initialized
11421debfc3dSmrg	in OMP_FOR_INIT.  In some cases, like C++ iterators, the original
11431debfc3dSmrg	DECL init has been lost in gimplification and now contains a
11441debfc3dSmrg	temporary (D.nnnn).  This list contains the original DECLs in
11451debfc3dSmrg	the source.
11461debfc3dSmrg
11471debfc3dSmrg   VAR must be an integer or pointer variable, which is implicitly thread
11481debfc3dSmrg   private.  N1, N2 and INCR are required to be loop invariant integer
11491debfc3dSmrg   expressions that are evaluated without any synchronization.
11501debfc3dSmrg   The evaluation order, frequency of evaluation and side-effects are
11511debfc3dSmrg   unspecified by the standards.  */
11521debfc3dSmrgDEFTREECODE (OMP_FOR, "omp_for", tcc_statement, 7)
11531debfc3dSmrg
11541debfc3dSmrg/* OpenMP - #pragma omp simd [clause1 ... clauseN]
11551debfc3dSmrg   Operands like for OMP_FOR.  */
11561debfc3dSmrgDEFTREECODE (OMP_SIMD, "omp_simd", tcc_statement, 7)
11571debfc3dSmrg
11581debfc3dSmrg/* OpenMP - #pragma omp distribute [clause1 ... clauseN]
11591debfc3dSmrg   Operands like for OMP_FOR.  */
11601debfc3dSmrgDEFTREECODE (OMP_DISTRIBUTE, "omp_distribute", tcc_statement, 7)
11611debfc3dSmrg
11621debfc3dSmrg/* OpenMP - #pragma omp taskloop [clause1 ... clauseN]
11631debfc3dSmrg   Operands like for OMP_FOR.  */
11641debfc3dSmrgDEFTREECODE (OMP_TASKLOOP, "omp_taskloop", tcc_statement, 7)
11651debfc3dSmrg
1166*8feb0f0bSmrg/* OpenMP - #pragma omp loop [clause1 ... clauseN]
1167*8feb0f0bSmrg   Operands like for OMP_FOR.  */
1168*8feb0f0bSmrgDEFTREECODE (OMP_LOOP, "omp_loop", tcc_statement, 7)
1169*8feb0f0bSmrg
11701debfc3dSmrg/* OpenMP - #pragma acc loop [clause1 ... clauseN]
11711debfc3dSmrg   Operands like for OMP_FOR.  */
11721debfc3dSmrgDEFTREECODE (OACC_LOOP, "oacc_loop", tcc_statement, 7)
11731debfc3dSmrg
11741debfc3dSmrg/* OpenMP - #pragma omp teams [clause1 ... clauseN]
11751debfc3dSmrg   Operand 0: OMP_TEAMS_BODY: Teams body.
11761debfc3dSmrg   Operand 1: OMP_TEAMS_CLAUSES: List of clauses.  */
11771debfc3dSmrgDEFTREECODE (OMP_TEAMS, "omp_teams", tcc_statement, 2)
11781debfc3dSmrg
11791debfc3dSmrg/* OpenMP - #pragma omp target data [clause1 ... clauseN]
11801debfc3dSmrg   Operand 0: OMP_TARGET_DATA_BODY: Target data construct body.
11811debfc3dSmrg   Operand 1: OMP_TARGET_DATA_CLAUSES: List of clauses.  */
11821debfc3dSmrgDEFTREECODE (OMP_TARGET_DATA, "omp_target_data", tcc_statement, 2)
11831debfc3dSmrg
11841debfc3dSmrg/* OpenMP - #pragma omp target [clause1 ... clauseN]
11851debfc3dSmrg   Operand 0: OMP_TARGET_BODY: Target construct body.
11861debfc3dSmrg   Operand 1: OMP_TARGET_CLAUSES: List of clauses.  */
11871debfc3dSmrgDEFTREECODE (OMP_TARGET, "omp_target", tcc_statement, 2)
11881debfc3dSmrg
11891debfc3dSmrg/* OpenMP - #pragma omp sections [clause1 ... clauseN]
11901debfc3dSmrg   Operand 0: OMP_SECTIONS_BODY: Sections body.
11911debfc3dSmrg   Operand 1: OMP_SECTIONS_CLAUSES: List of clauses.  */
11921debfc3dSmrgDEFTREECODE (OMP_SECTIONS, "omp_sections", tcc_statement, 2)
11931debfc3dSmrg
11941debfc3dSmrg/* OpenMP - #pragma omp ordered
11951debfc3dSmrg   Operand 0: OMP_ORDERED_BODY: Master section body.
11961debfc3dSmrg   Operand 1: OMP_ORDERED_CLAUSES: List of clauses.  */
11971debfc3dSmrgDEFTREECODE (OMP_ORDERED, "omp_ordered", tcc_statement, 2)
11981debfc3dSmrg
11991debfc3dSmrg/* OpenMP - #pragma omp critical [name]
12001debfc3dSmrg   Operand 0: OMP_CRITICAL_BODY: Critical section body.
12011debfc3dSmrg   Operand 1: OMP_CRITICAL_CLAUSES: List of clauses.
12021debfc3dSmrg   Operand 2: OMP_CRITICAL_NAME: Identifier for critical section.  */
12031debfc3dSmrgDEFTREECODE (OMP_CRITICAL, "omp_critical", tcc_statement, 3)
12041debfc3dSmrg
12051debfc3dSmrg/* OpenMP - #pragma omp single
12061debfc3dSmrg   Operand 0: OMP_SINGLE_BODY: Single section body.
12071debfc3dSmrg   Operand 1: OMP_SINGLE_CLAUSES: List of clauses.  */
12081debfc3dSmrgDEFTREECODE (OMP_SINGLE, "omp_single", tcc_statement, 2)
12091debfc3dSmrg
1210c0a68be4Smrg/* OpenMP - #pragma omp taskgroup
1211c0a68be4Smrg   Operand 0: OMP_TASKGROUP_BODY: Taskgroup body.
1212c0a68be4Smrg   Operand 1: OMP_SINGLE_CLAUSES: List of clauses.  */
1213c0a68be4SmrgDEFTREECODE (OMP_TASKGROUP, "omp_taskgroup", tcc_statement, 2)
1214c0a68be4Smrg
1215*8feb0f0bSmrg/* OpenMP - #pragma omp scan
1216*8feb0f0bSmrg   Operand 0: OMP_SCAN_BODY: Scan body.
1217*8feb0f0bSmrg   Operand 1: OMP_SCAN_CLAUSES: List of clauses.  */
1218*8feb0f0bSmrgDEFTREECODE (OMP_SCAN, "omp_scan", tcc_statement, 2)
1219*8feb0f0bSmrg
12201debfc3dSmrg/* OpenMP - #pragma omp section
12211debfc3dSmrg   Operand 0: OMP_SECTION_BODY: Section body.  */
12221debfc3dSmrgDEFTREECODE (OMP_SECTION, "omp_section", tcc_statement, 1)
12231debfc3dSmrg
12241debfc3dSmrg/* OpenMP - #pragma omp master
12251debfc3dSmrg   Operand 0: OMP_MASTER_BODY: Master section body.  */
12261debfc3dSmrgDEFTREECODE (OMP_MASTER, "omp_master", tcc_statement, 1)
12271debfc3dSmrg
12281debfc3dSmrg/* OpenACC - #pragma acc cache (variable1 ... variableN)
12291debfc3dSmrg   Operand 0: OACC_CACHE_CLAUSES: List of variables (transformed into
12301debfc3dSmrg	OMP_CLAUSE__CACHE_ clauses).  */
12311debfc3dSmrgDEFTREECODE (OACC_CACHE, "oacc_cache", tcc_statement, 1)
12321debfc3dSmrg
12331debfc3dSmrg/* OpenACC - #pragma acc declare [clause1 ... clauseN]
12341debfc3dSmrg   Operand 0: OACC_DECLARE_CLAUSES: List of clauses.  */
12351debfc3dSmrgDEFTREECODE (OACC_DECLARE, "oacc_declare", tcc_statement, 1)
12361debfc3dSmrg
12371debfc3dSmrg/* OpenACC - #pragma acc enter data [clause1 ... clauseN]
12381debfc3dSmrg   Operand 0: OACC_ENTER_DATA_CLAUSES: List of clauses.  */
12391debfc3dSmrgDEFTREECODE (OACC_ENTER_DATA, "oacc_enter_data", tcc_statement, 1)
12401debfc3dSmrg
12411debfc3dSmrg/* OpenACC - #pragma acc exit data [clause1 ... clauseN]
12421debfc3dSmrg   Operand 0: OACC_EXIT_DATA_CLAUSES: List of clauses.  */
12431debfc3dSmrgDEFTREECODE (OACC_EXIT_DATA, "oacc_exit_data", tcc_statement, 1)
12441debfc3dSmrg
12451debfc3dSmrg/* OpenACC - #pragma acc update [clause1 ... clauseN]
12461debfc3dSmrg   Operand 0: OACC_UPDATE_CLAUSES: List of clauses.  */
12471debfc3dSmrgDEFTREECODE (OACC_UPDATE, "oacc_update", tcc_statement, 1)
12481debfc3dSmrg
12491debfc3dSmrg/* OpenMP - #pragma omp target update [clause1 ... clauseN]
12501debfc3dSmrg   Operand 0: OMP_TARGET_UPDATE_CLAUSES: List of clauses.  */
12511debfc3dSmrgDEFTREECODE (OMP_TARGET_UPDATE, "omp_target_update", tcc_statement, 1)
12521debfc3dSmrg
12531debfc3dSmrg/* OpenMP - #pragma omp target enter data [clause1 ... clauseN]
12541debfc3dSmrg   Operand 0: OMP_TARGET_ENTER_DATA_CLAUSES: List of clauses.  */
12551debfc3dSmrgDEFTREECODE (OMP_TARGET_ENTER_DATA, "omp_target_enter_data", tcc_statement, 1)
12561debfc3dSmrg
12571debfc3dSmrg/* OpenMP - #pragma omp target exit data [clause1 ... clauseN]
12581debfc3dSmrg   Operand 0: OMP_TARGET_EXIT_DATA_CLAUSES: List of clauses.  */
12591debfc3dSmrgDEFTREECODE (OMP_TARGET_EXIT_DATA, "omp_target_exit_data", tcc_statement, 1)
12601debfc3dSmrg
12611debfc3dSmrg/* OMP_ATOMIC through OMP_ATOMIC_CAPTURE_NEW must be consecutive,
12621debfc3dSmrg   or OMP_ATOMIC_SEQ_CST needs adjusting.  */
12631debfc3dSmrg
12641debfc3dSmrg/* OpenMP - #pragma omp atomic
12651debfc3dSmrg   Operand 0: The address at which the atomic operation is to be performed.
12661debfc3dSmrg	This address should be stabilized with save_expr.
12671debfc3dSmrg   Operand 1: The expression to evaluate.  When the old value of the object
12681debfc3dSmrg	at the address is used in the expression, it should appear as if
12691debfc3dSmrg	build_fold_indirect_ref of the address.  */
12701debfc3dSmrgDEFTREECODE (OMP_ATOMIC, "omp_atomic", tcc_statement, 2)
12711debfc3dSmrg
12721debfc3dSmrg/* OpenMP - #pragma omp atomic read
12731debfc3dSmrg   Operand 0: The address at which the atomic operation is to be performed.
12741debfc3dSmrg	This address should be stabilized with save_expr.  */
12751debfc3dSmrgDEFTREECODE (OMP_ATOMIC_READ, "omp_atomic_read", tcc_statement, 1)
12761debfc3dSmrg
12771debfc3dSmrg/* OpenMP - #pragma omp atomic capture
12781debfc3dSmrg   Operand 0: The address at which the atomic operation is to be performed.
12791debfc3dSmrg	This address should be stabilized with save_expr.
12801debfc3dSmrg   Operand 1: The expression to evaluate.  When the old value of the object
12811debfc3dSmrg	at the address is used in the expression, it should appear as if
12821debfc3dSmrg	build_fold_indirect_ref of the address.
12831debfc3dSmrg   OMP_ATOMIC_CAPTURE_OLD returns the old memory content,
12841debfc3dSmrg   OMP_ATOMIC_CAPTURE_NEW the new value.  */
12851debfc3dSmrgDEFTREECODE (OMP_ATOMIC_CAPTURE_OLD, "omp_atomic_capture_old", tcc_statement, 2)
12861debfc3dSmrgDEFTREECODE (OMP_ATOMIC_CAPTURE_NEW, "omp_atomic_capture_new", tcc_statement, 2)
12871debfc3dSmrg
12881debfc3dSmrg/* OpenMP clauses.  */
12891debfc3dSmrgDEFTREECODE (OMP_CLAUSE, "omp_clause", tcc_exceptional, 0)
12901debfc3dSmrg
12911debfc3dSmrg/* TRANSACTION_EXPR tree code.
12921debfc3dSmrg   Operand 0: BODY: contains body of the transaction.  */
12931debfc3dSmrgDEFTREECODE (TRANSACTION_EXPR, "transaction_expr", tcc_expression, 1)
12941debfc3dSmrg
12951debfc3dSmrg/* Widening dot-product.
12961debfc3dSmrg   The first two arguments are of type t1.
12971debfc3dSmrg   The third argument and the result are of type t2, such that t2 is at least
12981debfc3dSmrg   twice the size of t1. DOT_PROD_EXPR(arg1,arg2,arg3) is equivalent to:
12991debfc3dSmrg   	tmp = WIDEN_MULT_EXPR(arg1, arg2);
13001debfc3dSmrg   	arg3 = PLUS_EXPR (tmp, arg3);
13011debfc3dSmrg   or:
13021debfc3dSmrg	tmp = WIDEN_MULT_EXPR(arg1, arg2);
13031debfc3dSmrg        arg3 = WIDEN_SUM_EXPR (tmp, arg3);		 */
13041debfc3dSmrgDEFTREECODE (DOT_PROD_EXPR, "dot_prod_expr", tcc_expression, 3)
13051debfc3dSmrg
13061debfc3dSmrg/* Widening summation.
13071debfc3dSmrg   The first argument is of type t1.
13081debfc3dSmrg   The second argument is of type t2, such that t2 is at least twice
13091debfc3dSmrg   the size of t1. The type of the entire expression is also t2.
13101debfc3dSmrg   WIDEN_SUM_EXPR is equivalent to first widening (promoting)
13111debfc3dSmrg   the first argument from type t1 to type t2, and then summing it
13121debfc3dSmrg   with the second argument.  */
13131debfc3dSmrgDEFTREECODE (WIDEN_SUM_EXPR, "widen_sum_expr", tcc_binary, 2)
13141debfc3dSmrg
13151debfc3dSmrg/* Widening sad (sum of absolute differences).
13161debfc3dSmrg   The first two arguments are of type t1 which should be integer.
13171debfc3dSmrg   The third argument and the result are of type t2, such that t2 is at least
13181debfc3dSmrg   twice the size of t1.  Like DOT_PROD_EXPR, SAD_EXPR (arg1,arg2,arg3) is
13191debfc3dSmrg   equivalent to (note we don't have WIDEN_MINUS_EXPR now, but we assume its
13201debfc3dSmrg   behavior is similar to WIDEN_SUM_EXPR):
13211debfc3dSmrg       tmp = WIDEN_MINUS_EXPR (arg1, arg2)
13221debfc3dSmrg       tmp2 = ABS_EXPR (tmp)
13231debfc3dSmrg       arg3 = PLUS_EXPR (tmp2, arg3)
13241debfc3dSmrg  or:
13251debfc3dSmrg       tmp = WIDEN_MINUS_EXPR (arg1, arg2)
13261debfc3dSmrg       tmp2 = ABS_EXPR (tmp)
13271debfc3dSmrg       arg3 = WIDEN_SUM_EXPR (tmp2, arg3)
13281debfc3dSmrg */
13291debfc3dSmrgDEFTREECODE (SAD_EXPR, "sad_expr", tcc_expression, 3)
13301debfc3dSmrg
13311debfc3dSmrg/* Widening multiplication.
13321debfc3dSmrg   The two arguments are of type t1.
13331debfc3dSmrg   The result is of type t2, such that t2 is at least twice
13341debfc3dSmrg   the size of t1. WIDEN_MULT_EXPR is equivalent to first widening (promoting)
13351debfc3dSmrg   the arguments from type t1 to type t2, and then multiplying them.  */
13361debfc3dSmrgDEFTREECODE (WIDEN_MULT_EXPR, "widen_mult_expr", tcc_binary, 2)
13371debfc3dSmrg
13381debfc3dSmrg/* Widening multiply-accumulate.
13391debfc3dSmrg   The first two arguments are of type t1.
13401debfc3dSmrg   The third argument and the result are of type t2, such as t2 is at least
13411debfc3dSmrg   twice the size of t1.  t1 and t2 must be integral or fixed-point types.
13421debfc3dSmrg   The expression is equivalent to a WIDEN_MULT_EXPR operation
13431debfc3dSmrg   of the first two operands followed by an add or subtract of the third
13441debfc3dSmrg   operand.  */
13451debfc3dSmrgDEFTREECODE (WIDEN_MULT_PLUS_EXPR, "widen_mult_plus_expr", tcc_expression, 3)
13461debfc3dSmrg/* This is like the above, except in the final expression the multiply result
13471debfc3dSmrg   is subtracted from t3.  */
13481debfc3dSmrgDEFTREECODE (WIDEN_MULT_MINUS_EXPR, "widen_mult_minus_expr", tcc_expression, 3)
13491debfc3dSmrg
13501debfc3dSmrg/* Widening shift left.
13511debfc3dSmrg   The first operand is of type t1.
13521debfc3dSmrg   The second operand is the number of bits to shift by; it need not be the
13531debfc3dSmrg   same type as the first operand and result.
13541debfc3dSmrg   Note that the result is undefined if the second operand is larger
13551debfc3dSmrg   than or equal to the first operand's type size.
13561debfc3dSmrg   The type of the entire expression is t2, such that t2 is at least twice
13571debfc3dSmrg   the size of t1.
13581debfc3dSmrg   WIDEN_LSHIFT_EXPR is equivalent to first widening (promoting)
13591debfc3dSmrg   the first argument from type t1 to type t2, and then shifting it
13601debfc3dSmrg   by the second argument.  */
13611debfc3dSmrgDEFTREECODE (WIDEN_LSHIFT_EXPR, "widen_lshift_expr", tcc_binary, 2)
13621debfc3dSmrg
13631debfc3dSmrg/* Widening vector multiplication.
13641debfc3dSmrg   The two operands are vectors with N elements of size S. Multiplying the
13651debfc3dSmrg   elements of the two vectors will result in N products of size 2*S.
13661debfc3dSmrg   VEC_WIDEN_MULT_HI_EXPR computes the N/2 high products.
13671debfc3dSmrg   VEC_WIDEN_MULT_LO_EXPR computes the N/2 low products.  */
13681debfc3dSmrgDEFTREECODE (VEC_WIDEN_MULT_HI_EXPR, "widen_mult_hi_expr", tcc_binary, 2)
13691debfc3dSmrgDEFTREECODE (VEC_WIDEN_MULT_LO_EXPR, "widen_mult_lo_expr", tcc_binary, 2)
13701debfc3dSmrg
13711debfc3dSmrg/* Similarly, but return the even or odd N/2 products.  */
13721debfc3dSmrgDEFTREECODE (VEC_WIDEN_MULT_EVEN_EXPR, "widen_mult_even_expr", tcc_binary, 2)
13731debfc3dSmrgDEFTREECODE (VEC_WIDEN_MULT_ODD_EXPR, "widen_mult_odd_expr", tcc_binary, 2)
13741debfc3dSmrg
13751debfc3dSmrg/* Unpack (extract and promote/widen) the high/low elements of the input
13761debfc3dSmrg   vector into the output vector.  The input vector has twice as many
13771debfc3dSmrg   elements as the output vector, that are half the size of the elements
13781debfc3dSmrg   of the output vector.  This is used to support type promotion. */
13791debfc3dSmrgDEFTREECODE (VEC_UNPACK_HI_EXPR, "vec_unpack_hi_expr", tcc_unary, 1)
13801debfc3dSmrgDEFTREECODE (VEC_UNPACK_LO_EXPR, "vec_unpack_lo_expr", tcc_unary, 1)
13811debfc3dSmrg
13821debfc3dSmrg/* Unpack (extract) the high/low elements of the input vector, convert
13831debfc3dSmrg   fixed point values to floating point and widen elements into the
13841debfc3dSmrg   output vector.  The input vector has twice as many elements as the output
13851debfc3dSmrg   vector, that are half the size of the elements of the output vector.  */
13861debfc3dSmrgDEFTREECODE (VEC_UNPACK_FLOAT_HI_EXPR, "vec_unpack_float_hi_expr", tcc_unary, 1)
13871debfc3dSmrgDEFTREECODE (VEC_UNPACK_FLOAT_LO_EXPR, "vec_unpack_float_lo_expr", tcc_unary, 1)
13881debfc3dSmrg
1389c0a68be4Smrg/* Unpack (extract) the high/low elements of the input vector, convert
1390c0a68be4Smrg   floating point values to integer and widen elements into the output
1391c0a68be4Smrg   vector.  The input vector has twice as many elements as the output
1392c0a68be4Smrg   vector, that are half the size of the elements of the output vector.  */
1393c0a68be4SmrgDEFTREECODE (VEC_UNPACK_FIX_TRUNC_HI_EXPR, "vec_unpack_fix_trunc_hi_expr",
1394c0a68be4Smrg	     tcc_unary, 1)
1395c0a68be4SmrgDEFTREECODE (VEC_UNPACK_FIX_TRUNC_LO_EXPR, "vec_unpack_fix_trunc_lo_expr",
1396c0a68be4Smrg	     tcc_unary, 1)
1397c0a68be4Smrg
13981debfc3dSmrg/* Pack (demote/narrow and merge) the elements of the two input vectors
13991debfc3dSmrg   into the output vector using truncation/saturation.
14001debfc3dSmrg   The elements of the input vectors are twice the size of the elements of the
14011debfc3dSmrg   output vector.  This is used to support type demotion.  */
14021debfc3dSmrgDEFTREECODE (VEC_PACK_TRUNC_EXPR, "vec_pack_trunc_expr", tcc_binary, 2)
14031debfc3dSmrgDEFTREECODE (VEC_PACK_SAT_EXPR, "vec_pack_sat_expr", tcc_binary, 2)
14041debfc3dSmrg
14051debfc3dSmrg/* Convert floating point values of the two input vectors to integer
14061debfc3dSmrg   and pack (narrow and merge) the elements into the output vector. The
14071debfc3dSmrg   elements of the input vector are twice the size of the elements of
14081debfc3dSmrg   the output vector.  */
14091debfc3dSmrgDEFTREECODE (VEC_PACK_FIX_TRUNC_EXPR, "vec_pack_fix_trunc_expr", tcc_binary, 2)
14101debfc3dSmrg
1411c0a68be4Smrg/* Convert fixed point values of the two input vectors to floating point
1412c0a68be4Smrg   and pack (narrow and merge) the elements into the output vector. The
1413c0a68be4Smrg   elements of the input vector are twice the size of the elements of
1414c0a68be4Smrg   the output vector.  */
1415c0a68be4SmrgDEFTREECODE (VEC_PACK_FLOAT_EXPR, "vec_pack_float_expr", tcc_binary, 2)
1416c0a68be4Smrg
14171debfc3dSmrg/* Widening vector shift left in bits.
14181debfc3dSmrg   Operand 0 is a vector to be shifted with N elements of size S.
14191debfc3dSmrg   Operand 1 is an integer shift amount in bits.
14201debfc3dSmrg   The result of the operation is N elements of size 2*S.
14211debfc3dSmrg   VEC_WIDEN_LSHIFT_HI_EXPR computes the N/2 high results.
14221debfc3dSmrg   VEC_WIDEN_LSHIFT_LO_EXPR computes the N/2 low results.
14231debfc3dSmrg */
14241debfc3dSmrgDEFTREECODE (VEC_WIDEN_LSHIFT_HI_EXPR, "widen_lshift_hi_expr", tcc_binary, 2)
14251debfc3dSmrgDEFTREECODE (VEC_WIDEN_LSHIFT_LO_EXPR, "widen_lshift_lo_expr", tcc_binary, 2)
14261debfc3dSmrg
14271debfc3dSmrg/* PREDICT_EXPR.  Specify hint for branch prediction.  The
14281debfc3dSmrg   PREDICT_EXPR_PREDICTOR specify predictor and PREDICT_EXPR_OUTCOME the
14291debfc3dSmrg   outcome (0 for not taken and 1 for taken).  Once the profile is guessed
14301debfc3dSmrg   all conditional branches leading to execution paths executing the
14311debfc3dSmrg   PREDICT_EXPR will get predicted by the specified predictor.  */
14321debfc3dSmrgDEFTREECODE (PREDICT_EXPR, "predict_expr", tcc_expression, 1)
14331debfc3dSmrg
14341debfc3dSmrg/* OPTIMIZATION_NODE.  Node to store the optimization options.  */
14351debfc3dSmrgDEFTREECODE (OPTIMIZATION_NODE, "optimization_node", tcc_exceptional, 0)
14361debfc3dSmrg
14371debfc3dSmrg/* TARGET_OPTION_NODE.  Node to store the target specific options.  */
14381debfc3dSmrgDEFTREECODE (TARGET_OPTION_NODE, "target_option_node", tcc_exceptional, 0)
14391debfc3dSmrg
14401debfc3dSmrg/* ANNOTATE_EXPR.
14411debfc3dSmrg   Operand 0 is the expression to be annotated.
1442a2dc1f3fSmrg   Operand 1 is the annotation kind.
1443a2dc1f3fSmrg   Operand 2 is additional data.  */
1444a2dc1f3fSmrgDEFTREECODE (ANNOTATE_EXPR, "annotate_expr", tcc_expression, 3)
14451debfc3dSmrg
14461debfc3dSmrg/*
14471debfc3dSmrgLocal variables:
14481debfc3dSmrgmode:c
14491debfc3dSmrgEnd:
14501debfc3dSmrg*/
1451