First of two patches that will enable salvaging of dbg.value instrinsics that
have multiple locations ops before the Loop Strength Reduction pass.
The existing single-op SCEV-based salvaging can generate variadic dbg.value
intrinsics in order to salvage a dbg.value that has a single location op.
If a dbg.value has multiple location ops before LSR, and LSR optimises
away one or more of the location operands, then no salvaging will be attempted.
Salvaging can now be added, but first this patch cleans up consistency
in both the code and comments, and applies some refactoring to make application
of the new salvaging implementation more straightforward.
- Use SCEVDbgValueBuilder for both types of recovery expressions: IV-offset based and iteration count based.
- Combine the functions that write the final DIExpression.
- Move some static functions into member functions.
Should this be ...from a given value... rather than ...for a given value...?