Variable tracking relies on MEM_EXPR
and REG_EXPR
annotations to determine what user variables memory and register
references refer to.
Variable tracking at assignments uses these notes only when they refer to variables that live at fixed locations (e.g., addressable variables, global non-automatic variables). For variables whose location may vary, it relies on the following types of notes.
(var_location:mode var exp stat)
¶Binds variable var
, a tree, to value exp, an RTL
expression. It appears only in NOTE_INSN_VAR_LOCATION
and
DEBUG_INSN
s, with slightly different meanings. mode, if
present, represents the mode of exp, which is useful if it is a
modeless expression. stat is only meaningful in notes,
indicating whether the variable is known to be initialized or
uninitialized.
(debug_expr:mode decl)
¶Stands for the value bound to the DEBUG_EXPR_DECL
decl,
that points back to it, within value expressions in
VAR_LOCATION
nodes.
(debug_implicit_ptr:mode decl)
¶Stands for the location of a decl that is no longer addressable.
(entry_value:mode decl)
¶Stands for the value a decl had at the entry point of the containing function.
(debug_parameter_ref:mode decl)
¶Refers to a parameter that was completely optimized out.
(debug_marker:mode)
¶Marks a program location. With VOIDmode
, it stands for the
beginning of a statement, a recommended inspection point logically after
all prior side effects, and before any subsequent side effects. With
BLKmode
, it indicates an inline entry point: the lexical block
encoded in the INSN_LOCATION
is the enclosing block that encloses
the inlined function.