[PATCH] D17211: Consider regmasks when computing register-based DBG_VALUE live ranges

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 23 13:32:49 PST 2016


rnk marked 4 inline comments as done.

================
Comment at: test/DebugInfo/MIR/X86/live-debug-values.mir:37
@@ -36,3 +37,1 @@
-# CHECK:      DBG_VALUE debug-use %rsi, debug-use _, !13, !20, debug-location !22
-# CHECK-NEXT: DBG_VALUE debug-use %ebx, debug-use _, !14, !20, debug-location !33
 
----------------
aprantl wrote:
> Could you explain this change?
> Was the original just wrong, or is there a different DBG_VALUE to check for now?
The original check was wrong. This BB is after the call to 'change', and it is claiming that 'argv' is still live in RSI, which is not true. There aren't any other DBG_VALUEs in this block.

================
Comment at: test/DebugInfo/X86/array.ll:19
@@ -18,4 +18,3 @@
 ;
-; CHECK:     ##DEBUG_VALUE: main:array <- [%R{{.*}}+0]
-; CHECK:     ##DEBUG_VALUE: main:array <- [%R{{.*}}+0]
-; CHECK:     ##DEBUG_VALUE: main:array <- [%R{{.*}}+0]
+; FIXME: If we described this location as RSP-relative instead of RDI-relative
+; the live range would be larger.
----------------
aprantl wrote:
> Is there a place in the LLVM sources we could move/clone this comment to?
It would be somewhere in the interaction between the register allocator and live debug variables. In other words, I have very little idea. =/

================
Comment at: test/DebugInfo/X86/dbg-value-regmask-clobber.ll:3
@@ +2,3 @@
+; RUN: llc < %s -filetype=obj | llvm-dwarfdump - | FileCheck %s --check-prefix=DWARF
+
+; Values in registers should be clobbered by calls, which use a regmask instead
----------------
aprantl wrote:
> We should consider rewriting this as a MIR testcase (http://llvm.org/docs/MIRLangRef.html).
> (It might be easier to understand the testcase if we can see the DBG_VALUEs that are the input for DbgValueHistoryCalulator.)
The IR testcase helped discover that I needed to update the LiveDebugValues pass, though. This feels like a pretty targeted IR test case for the backend: four basic blocks, some stores, one call. I guess I'd rather leave it as it is or have both tests. WDYT?


http://reviews.llvm.org/D17211





More information about the llvm-commits mailing list