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)
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)
DEBUG_EXPR_DECL
decl,
that points back to it, within value expressions in
VAR_LOCATION
nodes.