gccint: Flags
1
1 14.5 Flags in an RTL Expression
1 ===============================
1
1 RTL expressions contain several flags (one-bit bit-fields) that are used
1 in certain types of expression. Most often they are accessed with the
1 following macros, which expand into lvalues.
1
1 'CROSSING_JUMP_P (X)'
1 Nonzero in a 'jump_insn' if it crosses between hot and cold
1 sections, which could potentially be very far apart in the
1 executable. The presence of this flag indicates to other
1 optimizations that this branching instruction should not be
1 "collapsed" into a simpler branching construct. It is used when
1 the optimization to partition basic blocks into hot and cold
1 sections is turned on.
1
1 'CONSTANT_POOL_ADDRESS_P (X)'
1 Nonzero in a 'symbol_ref' if it refers to part of the current
1 function's constant pool. For most targets these addresses are in
1 a '.rodata' section entirely separate from the function, but for
1 some targets the addresses are close to the beginning of the
1 function. In either case GCC assumes these addresses can be
1 addressed directly, perhaps with the help of base registers.
1 Stored in the 'unchanging' field and printed as '/u'.
1
1 'INSN_ANNULLED_BRANCH_P (X)'
1 In a 'jump_insn', 'call_insn', or 'insn' indicates that the branch
1 is an annulling one. See the discussion under 'sequence' below.
1 Stored in the 'unchanging' field and printed as '/u'.
1
1 'INSN_DELETED_P (X)'
1 In an 'insn', 'call_insn', 'jump_insn', 'code_label',
1 'jump_table_data', 'barrier', or 'note', nonzero if the insn has
1 been deleted. Stored in the 'volatil' field and printed as '/v'.
1
1 'INSN_FROM_TARGET_P (X)'
1 In an 'insn' or 'jump_insn' or 'call_insn' in a delay slot of a
1 branch, indicates that the insn is from the target of the branch.
1 If the branch insn has 'INSN_ANNULLED_BRANCH_P' set, this insn will
1 only be executed if the branch is taken. For annulled branches
1 with 'INSN_FROM_TARGET_P' clear, the insn will be executed only if
1 the branch is not taken. When 'INSN_ANNULLED_BRANCH_P' is not set,
1 this insn will always be executed. Stored in the 'in_struct' field
1 and printed as '/s'.
1
1 'LABEL_PRESERVE_P (X)'
1 In a 'code_label' or 'note', indicates that the label is referenced
1 by code or data not visible to the RTL of a given function. Labels
1 referenced by a non-local goto will have this bit set. Stored in
1 the 'in_struct' field and printed as '/s'.
1
1 'LABEL_REF_NONLOCAL_P (X)'
1 In 'label_ref' and 'reg_label' expressions, nonzero if this is a
1 reference to a non-local label. Stored in the 'volatil' field and
1 printed as '/v'.
1
1 'MEM_KEEP_ALIAS_SET_P (X)'
1 In 'mem' expressions, 1 if we should keep the alias set for this
1 mem unchanged when we access a component. Set to 1, for example,
1 when we are already in a non-addressable component of an aggregate.
1 Stored in the 'jump' field and printed as '/j'.
1
1 'MEM_VOLATILE_P (X)'
1 In 'mem', 'asm_operands', and 'asm_input' expressions, nonzero for
1 volatile memory references. Stored in the 'volatil' field and
1 printed as '/v'.
1
1 'MEM_NOTRAP_P (X)'
1 In 'mem', nonzero for memory references that will not trap. Stored
1 in the 'call' field and printed as '/c'.
1
1 'MEM_POINTER (X)'
1 Nonzero in a 'mem' if the memory reference holds a pointer. Stored
1 in the 'frame_related' field and printed as '/f'.
1
1 'MEM_READONLY_P (X)'
1 Nonzero in a 'mem', if the memory is statically allocated and
1 read-only.
1
1 Read-only in this context means never modified during the lifetime
1 of the program, not necessarily in ROM or in write-disabled pages.
1 A common example of the later is a shared library's global offset
1 table. This table is initialized by the runtime loader, so the
1 memory is technically writable, but after control is transferred
1 from the runtime loader to the application, this memory will never
1 be subsequently modified.
1
1 Stored in the 'unchanging' field and printed as '/u'.
1
1 'PREFETCH_SCHEDULE_BARRIER_P (X)'
1 In a 'prefetch', indicates that the prefetch is a scheduling
1 barrier. No other INSNs will be moved over it. Stored in the
1 'volatil' field and printed as '/v'.
1
1 'REG_FUNCTION_VALUE_P (X)'
1 Nonzero in a 'reg' if it is the place in which this function's
1 value is going to be returned. (This happens only in a hard
1 register.) Stored in the 'return_val' field and printed as '/i'.
1
1 'REG_POINTER (X)'
1 Nonzero in a 'reg' if the register holds a pointer. Stored in the
1 'frame_related' field and printed as '/f'.
1
1 'REG_USERVAR_P (X)'
1 In a 'reg', nonzero if it corresponds to a variable present in the
1 user's source code. Zero for temporaries generated internally by
1 the compiler. Stored in the 'volatil' field and printed as '/v'.
1
1 The same hard register may be used also for collecting the values
1 of functions called by this one, but 'REG_FUNCTION_VALUE_P' is zero
1 in this kind of use.
1
1 'RTL_CONST_CALL_P (X)'
1 In a 'call_insn' indicates that the insn represents a call to a
1 const function. Stored in the 'unchanging' field and printed as
1 '/u'.
1
1 'RTL_PURE_CALL_P (X)'
1 In a 'call_insn' indicates that the insn represents a call to a
1 pure function. Stored in the 'return_val' field and printed as
1 '/i'.
1
1 'RTL_CONST_OR_PURE_CALL_P (X)'
1 In a 'call_insn', true if 'RTL_CONST_CALL_P' or 'RTL_PURE_CALL_P'
1 is true.
1
1 'RTL_LOOPING_CONST_OR_PURE_CALL_P (X)'
1 In a 'call_insn' indicates that the insn represents a possibly
1 infinite looping call to a const or pure function. Stored in the
1 'call' field and printed as '/c'. Only true if one of
1 'RTL_CONST_CALL_P' or 'RTL_PURE_CALL_P' is true.
1
1 'RTX_FRAME_RELATED_P (X)'
1 Nonzero in an 'insn', 'call_insn', 'jump_insn', 'barrier', or 'set'
1 which is part of a function prologue and sets the stack pointer,
1 sets the frame pointer, or saves a register. This flag should also
1 be set on an instruction that sets up a temporary register to use
1 in place of the frame pointer. Stored in the 'frame_related' field
1 and printed as '/f'.
1
1 In particular, on RISC targets where there are limits on the sizes
1 of immediate constants, it is sometimes impossible to reach the
1 register save area directly from the stack pointer. In that case,
1 a temporary register is used that is near enough to the register
1 save area, and the Canonical Frame Address, i.e., DWARF2's logical
1 frame pointer, register must (temporarily) be changed to be this
1 temporary register. So, the instruction that sets this temporary
1 register must be marked as 'RTX_FRAME_RELATED_P'.
1
1 If the marked instruction is overly complex (defined in terms of
1 what 'dwarf2out_frame_debug_expr' can handle), you will also have
1 to create a 'REG_FRAME_RELATED_EXPR' note and attach it to the
1 instruction. This note should contain a simple expression of the
1 computation performed by this instruction, i.e., one that
1 'dwarf2out_frame_debug_expr' can handle.
1
1 This flag is required for exception handling support on targets
1 with RTL prologues.
1
1 'SCHED_GROUP_P (X)'
1 During instruction scheduling, in an 'insn', 'call_insn',
1 'jump_insn' or 'jump_table_data', indicates that the previous insn
1 must be scheduled together with this insn. This is used to ensure
1 that certain groups of instructions will not be split up by the
1 instruction scheduling pass, for example, 'use' insns before a
1 'call_insn' may not be separated from the 'call_insn'. Stored in
1 the 'in_struct' field and printed as '/s'.
1
1 'SET_IS_RETURN_P (X)'
1 For a 'set', nonzero if it is for a return. Stored in the 'jump'
1 field and printed as '/j'.
1
1 'SIBLING_CALL_P (X)'
1 For a 'call_insn', nonzero if the insn is a sibling call. Stored
1 in the 'jump' field and printed as '/j'.
1
1 'STRING_POOL_ADDRESS_P (X)'
1 For a 'symbol_ref' expression, nonzero if it addresses this
1 function's string constant pool. Stored in the 'frame_related'
1 field and printed as '/f'.
1
1 'SUBREG_PROMOTED_UNSIGNED_P (X)'
1 Returns a value greater then zero for a 'subreg' that has
1 'SUBREG_PROMOTED_VAR_P' nonzero if the object being referenced is
1 kept zero-extended, zero if it is kept sign-extended, and less then
1 zero if it is extended some other way via the 'ptr_extend'
1 instruction. Stored in the 'unchanging' field and 'volatil' field,
1 printed as '/u' and '/v'. This macro may only be used to get the
1 value it may not be used to change the value. Use
1 'SUBREG_PROMOTED_UNSIGNED_SET' to change the value.
1
1 'SUBREG_PROMOTED_UNSIGNED_SET (X)'
1 Set the 'unchanging' and 'volatil' fields in a 'subreg' to reflect
1 zero, sign, or other extension. If 'volatil' is zero, then
1 'unchanging' as nonzero means zero extension and as zero means sign
1 extension. If 'volatil' is nonzero then some other type of
1 extension was done via the 'ptr_extend' instruction.
1
1 'SUBREG_PROMOTED_VAR_P (X)'
1 Nonzero in a 'subreg' if it was made when accessing an object that
1 was promoted to a wider mode in accord with the 'PROMOTED_MODE'
1 machine description macro (⇒Storage Layout). In this case,
1 the mode of the 'subreg' is the declared mode of the object and the
1 mode of 'SUBREG_REG' is the mode of the register that holds the
1 object. Promoted variables are always either sign- or
1 zero-extended to the wider mode on every assignment. Stored in the
1 'in_struct' field and printed as '/s'.
1
1 'SYMBOL_REF_USED (X)'
1 In a 'symbol_ref', indicates that X has been used. This is
1 normally only used to ensure that X is only declared external once.
1 Stored in the 'used' field.
1
1 'SYMBOL_REF_WEAK (X)'
1 In a 'symbol_ref', indicates that X has been declared weak. Stored
1 in the 'return_val' field and printed as '/i'.
1
1 'SYMBOL_REF_FLAG (X)'
1 In a 'symbol_ref', this is used as a flag for machine-specific
1 purposes. Stored in the 'volatil' field and printed as '/v'.
1
1 Most uses of 'SYMBOL_REF_FLAG' are historic and may be subsumed by
1 'SYMBOL_REF_FLAGS'. Certainly use of 'SYMBOL_REF_FLAGS' is
1 mandatory if the target requires more than one bit of storage.
1
1 These are the fields to which the above macros refer:
1
1 'call'
1 In a 'mem', 1 means that the memory reference will not trap.
1
1 In a 'call', 1 means that this pure or const call may possibly
1 infinite loop.
1
1 In an RTL dump, this flag is represented as '/c'.
1
1 'frame_related'
1 In an 'insn' or 'set' expression, 1 means that it is part of a
1 function prologue and sets the stack pointer, sets the frame
1 pointer, saves a register, or sets up a temporary register to use
1 in place of the frame pointer.
1
1 In 'reg' expressions, 1 means that the register holds a pointer.
1
1 In 'mem' expressions, 1 means that the memory reference holds a
1 pointer.
1
1 In 'symbol_ref' expressions, 1 means that the reference addresses
1 this function's string constant pool.
1
1 In an RTL dump, this flag is represented as '/f'.
1
1 'in_struct'
1 In 'reg' expressions, it is 1 if the register has its entire life
1 contained within the test expression of some loop.
1
1 In 'subreg' expressions, 1 means that the 'subreg' is accessing an
1 object that has had its mode promoted from a wider mode.
1
1 In 'label_ref' expressions, 1 means that the referenced label is
1 outside the innermost loop containing the insn in which the
1 'label_ref' was found.
1
1 In 'code_label' expressions, it is 1 if the label may never be
1 deleted. This is used for labels which are the target of non-local
1 gotos. Such a label that would have been deleted is replaced with
1 a 'note' of type 'NOTE_INSN_DELETED_LABEL'.
1
1 In an 'insn' during dead-code elimination, 1 means that the insn is
1 dead code.
1
1 In an 'insn' or 'jump_insn' during reorg for an insn in the delay
1 slot of a branch, 1 means that this insn is from the target of the
1 branch.
1
1 In an 'insn' during instruction scheduling, 1 means that this insn
1 must be scheduled as part of a group together with the previous
1 insn.
1
1 In an RTL dump, this flag is represented as '/s'.
1
1 'return_val'
1 In 'reg' expressions, 1 means the register contains the value to be
1 returned by the current function. On machines that pass parameters
1 in registers, the same register number may be used for parameters
1 as well, but this flag is not set on such uses.
1
1 In 'symbol_ref' expressions, 1 means the referenced symbol is weak.
1
1 In 'call' expressions, 1 means the call is pure.
1
1 In an RTL dump, this flag is represented as '/i'.
1
1 'jump'
1 In a 'mem' expression, 1 means we should keep the alias set for
1 this mem unchanged when we access a component.
1
1 In a 'set', 1 means it is for a return.
1
1 In a 'call_insn', 1 means it is a sibling call.
1
1 In a 'jump_insn', 1 means it is a crossing jump.
1
1 In an RTL dump, this flag is represented as '/j'.
1
1 'unchanging'
1 In 'reg' and 'mem' expressions, 1 means that the value of the
1 expression never changes.
1
1 In 'subreg' expressions, it is 1 if the 'subreg' references an
1 unsigned object whose mode has been promoted to a wider mode.
1
1 In an 'insn' or 'jump_insn' in the delay slot of a branch
1 instruction, 1 means an annulling branch should be used.
1
1 In a 'symbol_ref' expression, 1 means that this symbol addresses
1 something in the per-function constant pool.
1
1 In a 'call_insn' 1 means that this instruction is a call to a const
1 function.
1
1 In an RTL dump, this flag is represented as '/u'.
1
1 'used'
1 This flag is used directly (without an access macro) at the end of
1 RTL generation for a function, to count the number of times an
1 expression appears in insns. Expressions that appear more than
11 once are copied, according to the rules for shared structure (⇒
Sharing).
1
1 For a 'reg', it is used directly (without an access macro) by the
1 leaf register renumbering code to ensure that each register is only
1 renumbered once.
1
1 In a 'symbol_ref', it indicates that an external declaration for
1 the symbol has already been written.
1
1 'volatil'
1 In a 'mem', 'asm_operands', or 'asm_input' expression, it is 1 if
1 the memory reference is volatile. Volatile memory references may
1 not be deleted, reordered or combined.
1
1 In a 'symbol_ref' expression, it is used for machine-specific
1 purposes.
1
1 In a 'reg' expression, it is 1 if the value is a user-level
1 variable. 0 indicates an internal compiler temporary.
1
1 In an 'insn', 1 means the insn has been deleted.
1
1 In 'label_ref' and 'reg_label' expressions, 1 means a reference to
1 a non-local label.
1
1 In 'prefetch' expressions, 1 means that the containing insn is a
1 scheduling barrier.
1
1 In an RTL dump, this flag is represented as '/v'.
1