Install a cache of DBG_INSTR_REF -> ValueIDNum resolutions, for scenarios where the value has to be reconstructed from several DBG_PHIs. Whenever this happens, it's because branch folding + tail duplication has messed with the SSA form of the program, and we have to solve a mini SSA problem to find the variable value. This is always called twice, so it makes sense to cache the value.
There's a secondary reason, which is that the resolveDbgPHIs function makes use of the per-register machine-value tables, potentially late in the LiveDebugValues process. Those are about to be freed earlier in the next patch I upload, so it's good to cache and avoid the second call to resolveDbgPHIs. There's also a compile time improvement for a few benchmarks [0]
Nit.