Flags in an RTL Expression
==========================
RTL expressions contain several flags (one-bit bit-fields) and other
values that are used in certain types of expression. Most often they
are accessed with the following macros:
`MEM_VOLATILE_P (X)'
In `mem' expressions, nonzero for volatile memory references.
Stored in the `volatil' field and printed as `/v'.
`MEM_IN_STRUCT_P (X)'
In `mem' expressions, nonzero for reference to an entire structure,
union or array, or to a component of one. Zero for references to a
scalar variable or through a pointer to a scalar. Stored in the
`in_struct' field and printed as `/s'. If both this flag and
MEM_SCALAR_P are clear, then we don't know whether this MEM is in a
structure or not. Both flags should never be simultaneously set.
`MEM_SCALAR_P (X)'
In `mem' expressions, nonzero for reference to a scalar known not
to be a member of a structure, union, or array. Zero for such
references and for indirections through pointers, even pointers
pointing to scalar types. If both this flag and MEM_STRUCT_P are
clear, then we don't know whether this MEM is in a structure or
not. Both flags should never be simultaneously set.
`MEM_ALIAS_SET (X)'
In `mem' expressions, the alias set to which X belongs. If zero,
X is not in any alias set, and may alias anything. If nonzero, X
may only alias objects in the same alias set. This value is set
(in a language-specific manner) by the front end. This field is
not a bit-field; it is in an integer, found as the second argument
to the `mem'.
`REG_LOOP_TEST_P'
In `reg' expressions, nonzero if this register's entire life is
contained in the exit test code for some loop. Stored in the
`in_struct' field and printed as `/s'.
`REG_USERVAR_P (X)'
In a `reg', nonzero if it corresponds to a variable present in the
user's source code. Zero for temporaries generated internally by
the compiler. Stored in the `volatil' field and printed as `/v'.
`REG_FUNCTION_VALUE_P (X)'
Nonzero in a `reg' if it is the place in which this function's
value is going to be returned. (This happens only in a hard
register.) Stored in the `integrated' field and printed as `/i'.
The same hard register may be used also for collecting the values
of functions called by this one, but `REG_FUNCTION_VALUE_P' is zero
in this kind of use.
`SUBREG_PROMOTED_VAR_P'
Nonzero in a `subreg' if it was made when accessing an object that
was promoted to a wider mode in accord with the `PROMOTED_MODE'
machine description macro (Note:Storage Layout). In this case,
the mode of the `subreg' is the declared mode of the object and
the mode of `SUBREG_REG' is the mode of the register that holds
the object. Promoted variables are always either sign- or
zero-extended to the wider mode on every assignment. Stored in
the `in_struct' field and printed as `/s'.
`SUBREG_PROMOTED_UNSIGNED_P'
Nonzero in a `subreg' that has `SUBREG_PROMOTED_VAR_P' nonzero if
the object being referenced is kept zero-extended and zero if it
is kept sign-extended. Stored in the `unchanging' field and
printed as `/u'.
`RTX_UNCHANGING_P (X)'
Nonzero in a `reg' or `mem' if the value is not changed. (This
flag is not set for memory references via pointers to constants.
Such pointers only guarantee that the object will not be changed
explicitly by the current function. The object might be changed by
other functions or by aliasing.) Stored in the `unchanging' field
and printed as `/u'.
`RTX_INTEGRATED_P (INSN)'
Nonzero in an insn if it resulted from an in-line function call.
Stored in the `integrated' field and printed as `/i'.
`RTX_FRAME_RELATED_P (X)'
Nonzero in an insn or expression which is part of a function
prologue and sets the stack pointer, sets the frame pointer, or
saves a register. This flag should also be set on an instruction
that sets up a temporary register to use in place of the frame
pointer.
In particular, on RISC targets where there are limits on the sizes
of immediate constants, it is sometimes impossible to reach the
register save area directly from the stack pointer. In that case,
a temporary register is used that is near enough to the register
save area, and the Canonical Frame Address, i.e., DWARF2's logical
frame pointer, register must (temporarily) be changed to be this
temporary register. So, the instruction that sets this temporary
register must be marked as `RTX_FRAME_RELATED_P'.
If the marked instruction is overly complex (defined in terms of
what `dwarf2out_frame_debug_expr' can handle), you will also have
to create a `REG_FRAME_RELATED_EXPR' note and attach it to the
instruction. This note should contain a simple expression of the
computation performed by this instruction, i.e., one that
`dwarf2out_frame_debug_expr' can handle.
This flag is required for exception handling support on targets
with RTL prologues.
`SYMBOL_REF_USED (X)'
In a `symbol_ref', indicates that X has been used. This is
normally only used to ensure that X is only declared external
once. Stored in the `used' field.
`SYMBOL_REF_FLAG (X)'
In a `symbol_ref', this is used as a flag for machine-specific
purposes. Stored in the `volatil' field and printed as `/v'.
`SYMBOL_REF_WEAK (X)'
In a `symbol_ref', indicates that X has been declared weak.
Stored in the `integrated' field and printed as `/i'.
`LABEL_OUTSIDE_LOOP_P'
In `label_ref' expressions, nonzero if this is a reference to a
label that is outside the innermost loop containing the reference
to the label. Stored in the `in_struct' field and printed as `/s'.
`INSN_DELETED_P (INSN)'
In an insn, nonzero if the insn has been deleted. Stored in the
`volatil' field and printed as `/v'.
`INSN_ANNULLED_BRANCH_P (INSN)'
In an `insn' in the delay slot of a branch insn, indicates that an
annulling branch should be used. See the discussion under
`sequence' below. Stored in the `unchanging' field and printed as
`/u'.
`INSN_FROM_TARGET_P (INSN)'
In an `insn' in a delay slot of a branch, indicates that the insn
is from the target of the branch. If the branch insn has
`INSN_ANNULLED_BRANCH_P' set, this insn will only be executed if
the branch is taken. For annulled branches with
`INSN_FROM_TARGET_P' clear, the insn will be executed only if the
branch is not taken. When `INSN_ANNULLED_BRANCH_P' is not set,
this insn will always be executed. Stored in the `in_struct'
field and printed as `/s'.
`CONSTANT_POOL_ADDRESS_P (X)'
Nonzero in a `symbol_ref' if it refers to part of the current
function's "constants pool". These are addresses close to the
beginning of the function, and GCC assumes they can be addressed
directly (perhaps with the help of base registers). Stored in the
`unchanging' field and printed as `/u'.
`CONST_CALL_P (X)'
In a `call_insn', indicates that the insn represents a call to a
const function. Stored in the `unchanging' field and printed as
`/u'.
`LABEL_PRESERVE_P (X)'
In a `code_label', indicates that the label can never be deleted.
Labels referenced by a non-local goto will have this bit set.
Stored in the `in_struct' field and printed as `/s'.
`SCHED_GROUP_P (INSN)'
During instruction scheduling, in an insn, indicates that the
previous insn must be scheduled together with this insn. This is
used to ensure that certain groups of instructions will not be
split up by the instruction scheduling pass, for example, `use'
insns before a `call_insn' may not be separated from the
`call_insn'. Stored in the `in_struct' field and printed as `/s'.
These are the fields which the above macros refer to:
`used'
Normally, this flag is used only momentarily, at the end of RTL
generation for a function, to count the number of times an
expression appears in insns. Expressions that appear more than
once are copied, according to the rules for shared structure
(Note:Sharing).
In a `symbol_ref', it indicates that an external declaration for
the symbol has already been written.
In a `reg', it is used by the leaf register renumbering code to
ensure that each register is only renumbered once.
`volatil'
This flag is used in `mem', `symbol_ref' and `reg' expressions and
in insns. In RTL dump files, it is printed as `/v'.
In a `mem' expression, it is 1 if the memory reference is volatile.
Volatile memory references may not be deleted, reordered or
combined.
In a `symbol_ref' expression, it is used for machine-specific
purposes.
In a `reg' expression, it is 1 if the value is a user-level
variable. 0 indicates an internal compiler temporary.
In an insn, 1 means the insn has been deleted.
`in_struct'
In `mem' expressions, it is 1 if the memory datum referred to is
all or part of a structure or array; 0 if it is (or might be) a
scalar variable. A reference through a C pointer has 0 because
the pointer might point to a scalar variable. This information
allows the compiler to determine something about possible cases of
aliasing.
In an insn in the delay slot of a branch, 1 means that this insn
is from the target of the branch.
During instruction scheduling, in an insn, 1 means that this insn
must be scheduled as part of a group together with the previous
insn.
In `reg' expressions, it is 1 if the register has its entire life
contained within the test expression of some loop.
In `subreg' expressions, 1 means that the `subreg' is accessing an
object that has had its mode promoted from a wider mode.
In `label_ref' expressions, 1 means that the referenced label is
outside the innermost loop containing the insn in which the
`label_ref' was found.
In `code_label' expressions, it is 1 if the label may never be
deleted. This is used for labels which are the target of
non-local gotos.
In an RTL dump, this flag is represented as `/s'.
`unchanging'
In `reg' and `mem' expressions, 1 means that the value of the
expression never changes.
In `subreg' expressions, it is 1 if the `subreg' references an
unsigned object whose mode has been promoted to a wider mode.
In an insn, 1 means that this is an annulling branch.
In a `symbol_ref' expression, 1 means that this symbol addresses
something in the per-function constants pool.
In a `call_insn', 1 means that this instruction is a call to a
const function.
In an RTL dump, this flag is represented as `/u'.
`integrated'
In some kinds of expressions, including insns, this flag means the
rtl was produced by procedure integration.
In a `reg' expression, this flag indicates the register containing
the value to be returned by the current function. On machines
that pass parameters in registers, the same register number may be
used for parameters as well, but this flag is not set on such uses.
automatically generated byinfo2wwwversion 1.2.2.9