Debug entry values functionality provides debug information about
call sites and function parameters values at the call entry spot.
Condition for generating this type of information is
compiling with -g option and optimization level higher than zero(-O0).
In ISEL phase, while lowering call instructions, collect info about registers
that forward arguments into following function frame.
We store such info into MachineFunction of the caller function.
This is used very late, when dumping DWARF info about call site parameters.
The call site info is visible at MIR level, as callSites attribute of MachineFunction.
Also, when using unmodified parameter value inside callee it could be
described as DW_OP_entry_value expression.
To deal with callSites attribute, we should pass -emit-call-site-info option to llc.
This patch enables functionality in clang frontend and adds call site info generation
support for MIPS targets(mips, mipsel, mips64, mips64el).
Tests:
-call-site-info-output.ll - existence of valid callSites attribute of MachineFunction, describing place of call instr and register forwarded parameters;
-dbg-call-site-info-reg-d-split.ll - omit from callSites, parameters forwarded through MIPS $D (temporary) register;
-dw_op_entry_value_32bit.ll, dw_op_entry_value_64bit.ll - confirm usage of call site info from callSites with DW_OP_entry_value (32 bit or 64 bit targets).
nit, this won't feed into doxygen, so the \p can be dropped.