(Context: this thread http://lists.llvm.org/pipermail/llvm-dev/2020-June/142368.html )
This patch contains a bunch of test changes to account for changes in output from the new instruction-referencing LiveDebugValues. It doesn't make all tests pass if you manually demand the new LiveDebugValues -- there are still some limitations, for example I haven't attempted entry values (yet). IMHO, it's Good Enough (TM) to be in-tree, even if it isn't 100% complete yet.
About 85% of the changes here are to CHECK lines that have a trailing !debug-location: InstrRef LDV generates a DILocation for new DBG_VALUEs with only a scope, instead of copying a previous DBG_VALUEs DebugLoc, and that leads to the location being printed as:
!debug-location !DILocation(line: 0, blah blah)
instead of
!debug-location !1234
The changes in this patch just chop off the !debug-location check. I guess it's arguable as to what kind of DebugLoc we want for propagated DBG_VALUEs. At the very least though, they don't affect output DWARF.
This patch additionally fiddles with:
- kill-after-spill.mir , where I've added a source location to each block in the program. InstrRef LDV refuses to propagate variable locations as far as the old one did, when the variables are out of scope,
- live-debug-values-bad-transfer.mir where a known bug/limitation has been fixed, I've added instrref-and-varloc expected outputs to test for.
Finally I've added two new tests:
- livedebugvalues_load_in_loop.mir , which shows off some multiple-location value tracking in action on a totally contrived input,
- livedebugvalues_many_loop_heads.mir , which demonstrates a pathological input to InstrRef LDV, as explained in the test file comment.
I've got a list of other inputs that InstrRef LDV finds difficult and want coverage, but they're not submittable-quality yet. I felt it was important to get this out now and add additional tests later, if people are happy with that.
I guess we do not need all the MF attributes here.