[PATCH] D38140: [DebugInfo] Do not extend range for physreg in LiveDebugVariables

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 26 15:31:08 PDT 2017


bjope added inline comments.


================
Comment at: test/DebugInfo/MIR/X86/live-debug-vars-unused-arg.mir:151
+#
+# CHECK-LABEL: ********** EMITTING LIVE DEBUG VARIABLES **********
+# CHECK-NEXT: !"argc,5"        [0B;0e):0 Loc0=%EDI
----------------
rnk wrote:
> I think this is testable with dwarfdump. The range for argc should run exactly up until it is clobbered by a0, so the location lists will look like:
> ```
> DW_TAG_formal_parameter
>   DW_AT_location (0xNNN
>     0x000 - [[SET_RDI:0x.*]]: RDI)
>   DW_AT_name: "argc"
> DW_TAG_variable
>   DW_AT_location (0xNNN
>     [[SET_RDI]] - {{.*}}: RDI)
>   DW_AT_name: "a0"
> ```
Sure we could probably use dwarfdump, but I think that would make this test case dependent on the behavior of the later passes emitting the dwarf, as well as dwarfdump. By stopping before livedebugvalues I will limit the test case to verify the behavior of LiveDebugVariables (and inevitably some other RA passes run together with "greedy"). I think it will make the test case more robust if we limit the scope of the test.

If we need to test the whole chain of passes (integration test of several passes), then we should add a test in the debuginfo-tests repo instead. Or what do you think?


https://reviews.llvm.org/D38140





More information about the llvm-commits mailing list