📄 rtl.texi
字号:
@findex MEM_POINTER@cindex @code{mem} and @samp{/f}@cindex @code{frame_related}, in @code{mem}@item MEM_POINTER (@var{x})Nonzero in a @code{mem} if the memory reference holds a pointer.Stored in the @code{frame_related} field and printed as @samp{/f}.@findex REG_FUNCTION_VALUE_P@cindex @code{reg} and @samp{/i}@cindex @code{return_val}, in @code{reg}@item REG_FUNCTION_VALUE_P (@var{x})Nonzero in a @code{reg} if it is the place in which this function'svalue is going to be returned. (This happens only in a hardregister.) Stored in the @code{return_val} field and printed as@samp{/i}.@findex REG_POINTER@cindex @code{reg} and @samp{/f}@cindex @code{frame_related}, in @code{reg}@item REG_POINTER (@var{x})Nonzero in a @code{reg} if the register holds a pointer. Stored in the@code{frame_related} field and printed as @samp{/f}.@findex REG_USERVAR_P@cindex @code{reg} and @samp{/v}@cindex @code{volatil}, in @code{reg}@item REG_USERVAR_P (@var{x})In a @code{reg}, nonzero if it corresponds to a variable present inthe user's source code. Zero for temporaries generated internally bythe compiler. Stored in the @code{volatil} field and printed as@samp{/v}.The same hard register may be used also for collecting the values offunctions called by this one, but @code{REG_FUNCTION_VALUE_P} is zeroin this kind of use.@findex RTX_FRAME_RELATED_P@cindex @code{insn} and @samp{/f}@cindex @code{call_insn} and @samp{/f}@cindex @code{jump_insn} and @samp{/f}@cindex @code{barrier} and @samp{/f}@cindex @code{set} and @samp{/f}@cindex @code{frame_related}, in @code{insn}, @code{call_insn}, @code{jump_insn}, @code{barrier}, and @code{set}@item RTX_FRAME_RELATED_P (@var{x})Nonzero in an @code{insn}, @code{call_insn}, @code{jump_insn},@code{barrier}, or @code{set} which is part of a function prologueand 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 temporaryregister to use in place of the frame pointer.Stored in the @code{frame_related} field and printed as @samp{/f}.In particular, on RISC targets where there are limits on the sizes ofimmediate constants, it is sometimes impossible to reach the registersave area directly from the stack pointer. In that case, a temporaryregister is used that is near enough to the register save area, and theCanonical Frame Address, i.e., DWARF2's logical frame pointer, registermust (temporarily) be changed to be this temporary register. So, theinstruction that sets this temporary register must be marked as@code{RTX_FRAME_RELATED_P}.If the marked instruction is overly complex (defined in terms of what@code{dwarf2out_frame_debug_expr} can handle), you will also have tocreate a @code{REG_FRAME_RELATED_EXPR} note and attach it to theinstruction. This note should contain a simple expression of thecomputation performed by this instruction, i.e., one that@code{dwarf2out_frame_debug_expr} can handle.This flag is required for exception handling support on targets with RTLprologues.@findex MEM_READONLY_P@cindex @code{mem} and @samp{/u}@cindex @code{unchanging}, in @code{mem}@item MEM_READONLY_P (@var{x})Nonzero in a @code{mem}, if the memory is statically allocated and read-only.Read-only in this context means never modified during the lifetime of theprogram, not necessarily in ROM or in write-disabled pages. A commonexample of the later is a shared library's global offset table. Thistable is initialized by the runtime loader, so the memory is technicallywritable, but after control is transfered from the runtime loader to theapplication, this memory will never be subsequently modified.Stored in the @code{unchanging} field and printed as @samp{/u}.@findex SCHED_GROUP_P@cindex @code{insn} and @samp{/s}@cindex @code{call_insn} and @samp{/s}@cindex @code{jump_insn} and @samp{/s}@cindex @code{in_struct}, in @code{insn}, @code{jump_insn} and @code{call_insn}@item SCHED_GROUP_P (@var{x})During instruction scheduling, in an @code{insn}, @code{call_insn} or@code{jump_insn}, indicates that theprevious insn must be scheduled together with this insn. This is used toensure that certain groups of instructions will not be split up by theinstruction scheduling pass, for example, @code{use} insns beforea @code{call_insn} may not be separated from the @code{call_insn}.Stored in the @code{in_struct} field and printed as @samp{/s}.@findex SET_IS_RETURN_P@cindex @code{insn} and @samp{/j}@cindex @code{jump}, in @code{insn}@item SET_IS_RETURN_P (@var{x})For a @code{set}, nonzero if it is for a return.Stored in the @code{jump} field and printed as @samp{/j}.@findex SIBLING_CALL_P@cindex @code{call_insn} and @samp{/j}@cindex @code{jump}, in @code{call_insn}@item SIBLING_CALL_P (@var{x})For a @code{call_insn}, nonzero if the insn is a sibling call.Stored in the @code{jump} field and printed as @samp{/j}.@findex STRING_POOL_ADDRESS_P@cindex @code{symbol_ref} and @samp{/f}@cindex @code{frame_related}, in @code{symbol_ref}@item STRING_POOL_ADDRESS_P (@var{x})For a @code{symbol_ref} expression, nonzero if it addresses this function'sstring constant pool.Stored in the @code{frame_related} field and printed as @samp{/f}.@findex SUBREG_PROMOTED_UNSIGNED_P@cindex @code{subreg} and @samp{/u} and @samp{/v}@cindex @code{unchanging}, in @code{subreg}@cindex @code{volatil}, in @code{subreg}@item SUBREG_PROMOTED_UNSIGNED_P (@var{x})Returns a value greater then zero for a @code{subreg} that has@code{SUBREG_PROMOTED_VAR_P} nonzero if the object being referenced is keptzero-extended, zero if it is kept sign-extended, and less then zero if it isextended some other way via the @code{ptr_extend} instruction.Stored in the @code{unchanging}field and @code{volatil} field, printed as @samp{/u} and @samp{/v}.This macro may only be used to get the value it may not be used to changethe value. Use @code{SUBREG_PROMOTED_UNSIGNED_SET} to change the value.@findex SUBREG_PROMOTED_UNSIGNED_SET@cindex @code{subreg} and @samp{/u}@cindex @code{unchanging}, in @code{subreg}@cindex @code{volatil}, in @code{subreg}@item SUBREG_PROMOTED_UNSIGNED_SET (@var{x})Set the @code{unchanging} and @code{volatil} fields in a @code{subreg}to reflect zero, sign, or other extension. If @code{volatil} iszero, then @code{unchanging} as nonzero means zero extension and aszero means sign extension. If @code{volatil} is nonzero then someother type of extension was done via the @code{ptr_extend} instruction.@findex SUBREG_PROMOTED_VAR_P@cindex @code{subreg} and @samp{/s}@cindex @code{in_struct}, in @code{subreg}@item SUBREG_PROMOTED_VAR_P (@var{x})Nonzero in a @code{subreg} if it was made when accessing an object thatwas promoted to a wider mode in accord with the @code{PROMOTED_MODE} machinedescription macro (@pxref{Storage Layout}). In this case, the mode ofthe @code{subreg} is the declared mode of the object and the mode of@code{SUBREG_REG} is the mode of the register that holds the object.Promoted variables are always either sign- or zero-extended to the widermode on every assignment. Stored in the @code{in_struct} field andprinted as @samp{/s}.@findex SYMBOL_REF_USED@cindex @code{used}, in @code{symbol_ref}@item SYMBOL_REF_USED (@var{x})In a @code{symbol_ref}, indicates that @var{x} has been used. This isnormally only used to ensure that @var{x} is only declared externalonce. Stored in the @code{used} field.@findex SYMBOL_REF_WEAK@cindex @code{symbol_ref} and @samp{/i}@cindex @code{return_val}, in @code{symbol_ref}@item SYMBOL_REF_WEAK (@var{x})In a @code{symbol_ref}, indicates that @var{x} has been declared weak.Stored in the @code{return_val} field and printed as @samp{/i}.@findex SYMBOL_REF_FLAG@cindex @code{symbol_ref} and @samp{/v}@cindex @code{volatil}, in @code{symbol_ref}@item SYMBOL_REF_FLAG (@var{x})In a @code{symbol_ref}, this is used as a flag for machine-specific purposes.Stored in the @code{volatil} field and printed as @samp{/v}.Most uses of @code{SYMBOL_REF_FLAG} are historic and may be subsumedby @code{SYMBOL_REF_FLAGS}. Certainly use of @code{SYMBOL_REF_FLAGS}is mandatory if the target requires more than one bit of storage.@end tableThese are the fields to which the above macros refer:@table @code@findex call@cindex @samp{/c} in RTL dump@item callIn a @code{mem}, 1 means that the memory reference will not trap.In an RTL dump, this flag is represented as @samp{/c}.@findex frame_related@cindex @samp{/f} in RTL dump@item frame_relatedIn an @code{insn} or @code{set} expression, 1 means that it is part ofa function prologue and sets the stack pointer, sets the frame pointer,saves a register, or sets up a temporary register to use in place of theframe pointer.In @code{reg} expressions, 1 means that the register holds a pointer.In @code{mem} expressions, 1 means that the memory reference holds a pointer.In @code{symbol_ref} expressions, 1 means that the reference addressesthis function's string constant pool.In an RTL dump, this flag is represented as @samp{/f}.@findex in_struct@cindex @samp{/s} in RTL dump@item in_structIn @code{mem} expressions, it is 1 if the memory datum referred to isall or part of a structure or array; 0 if it is (or might be) a scalarvariable. A reference through a C pointer has 0 because the pointermight point to a scalar variable. This information allows the compilerto determine something about possible cases of aliasing.In @code{reg} expressions, it is 1 if the register has its entire lifecontained within the test expression of some loop.In @code{subreg} expressions, 1 means that the @code{subreg} is accessingan object that has had its mode promoted from a wider mode.In @code{label_ref} expressions, 1 means that the referenced label isoutside the innermost loop containing the insn in which the @code{label_ref}was found.In @code{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. Such alabel that would have been deleted is replaced with a @code{note} of type@code{NOTE_INSN_DELETED_LABEL}.In an @code{insn} during dead-code elimination, 1 means that the insn isdead code.In an @code{insn} or @code{jump_insn} during reorg for an insn in thedelay slot of a branch,1 means that this insn is from the target of the branch.In an @code{insn} during instruction scheduling, 1 means that this insnmust be scheduled as part of a group together with the previous insn.In an RTL dump, this flag is represented as @samp{/s}.@findex return_val@cindex @samp{/i} in RTL dump@item return_valIn @code{reg} expressions, 1 means the register containsthe value to be returned by the current function. Onmachines that pass parameters in registers, the same register numbermay be used for parameters as well, but this flag is not set on suchuses.In @code{mem} expressions, 1 means the memory reference is to a scalarknown not to be a member of a structure, union, or array.In @code{symbol_ref} expressions, 1 means the referenced symbol is weak.In an RTL dump, this flag is represented as @samp{/i}.@findex jump@cindex @samp{/j} in RTL dump@item jumpIn a @code{mem} expression, 1 means we should keep the alias set for thismem unchanged when we access a component.In a @code{set}, 1 means it is for a return.In a @code{call_insn}, 1 means it is a sibling call.In an RTL dump, this flag is represented as @samp{/j}.@findex unchanging@cindex @samp{/u} in RTL dump@item unchangingIn @code{reg} and @code{mem} expressions, 1 meansthat the value of the expression never changes.In @code{subreg} expressions, it is 1 if the @code{subreg} references anunsigned object whose mode has been promoted to a wider mode.In an @code{insn} or @code{jump_insn} in the delay slot of a branchinstruction, 1 means an annulling branch should be used.In a @code{symbol_ref} expression, 1 means that this symbol addressessomething in the per-function constant pool.In a @code{call_insn}, @code{note}, or an @code{expr_list} of notes,1 means that this instruction is a call to a const or pure function.In an RTL dump, this flag is represented as @samp{/u}.@findex used@item usedThis flag is used directly (without an access macro) at the end of RTLgeneration for a function, to count the number of times an expressionappears in insns. Expressions that appear more than once are copied,according to the rules for shared structure (@pxref{Sharing}).For a @code{reg}, it is used directly (without an access macro) by theleaf register renumbering code to ensure that each register is onlyrenumbered once.In a @code{symbol_ref}, it indicates that an external declaration forthe symbol has already been written.@findex volatil@cindex @samp{/v} in RTL dump@item volatil@cindex volatile memory referencesIn a @code{mem}, @code{asm_operands}, or @code{asm_input}expression, it is 1 if the memoryreference is volatile. Volatile memory references may not be deleted,reordered or combined.In a @code{symbol_ref} expression, it is used for machine-specificpurposes.In a @code{reg} expression, it is 1 if the value is a user-level variable.0 indicates an internal compiler temporary.In an @code{insn}, 1 means the insn has been deleted.In @code{label_ref} and @code{reg_label} expressions, 1 means a referenceto a non-local label.In an RTL dump, this flag is represented as @samp{/v}.@end table@node Machine Modes@section Machine Modes@cindex machine modes@findex enum machine_modeA machine mode describes a size of data object and the representation used
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -