When calculating the debug value history, DbgEntityHistoryCalculator
would only keep track of register clobbering for the latest debug value
per inlined entity. This meant that preceding register-described debug
value fragments would live on until the next overlapping debug value,
ignoring any potential clobbering. This patch amends
DbgEntityHistoryCalculator so that it keeps track of all registers that
a inlined entity's currently live debug values are described by.
The DebugInfo/COFF/pieces.ll test case has had to be changed since
previously a register-described fragment would incorrectly outlive its
basic block.
The parent patch is expected to increase the coverage slightly, as it
makes sure that location list entries are inserted after clobbered
fragments, and this patch is expected to decrease it, as it stops
preceding register-described from living longer than they should. All
in all, this patch and the preceding patch has a negligible effect
on the output from `llvm-dwarfdump -statistics' for a clang-3.4 binary
built using the RelWithDebInfo build profile. "Scope bytes covered"
increases by 0.5%, and "variables with location" increases from 2212083
to 2212088, but it should improve the accuracy quite a bit.
This fixes PR40283.
///
\p Var