[PATCH] D38229: [DebugInfo] Insert DEBUG_VALUEs after each register redefinition

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 4 09:21:44 PDT 2017


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm, my concern about hoisting can definitely be handled separately.



================
Comment at: lib/CodeGen/LiveDebugVariables.cpp:1116
+  SlotIndex MBBEndIdx = LIS.getMBBEndIdx(&*MBB);
+  // Only search within the current MBB.
+  StopIdx = (MBBEndIdx < StopIdx) ? MBBEndIdx : StopIdx;
----------------
These slot indices never cross BBs, right? We should be pre-layout here, so it wouldn't make sense to try to coalesce variable locations across MBBs.


================
Comment at: test/DebugInfo/X86/pr34545.ll:26
+  tail call void @llvm.dbg.value(metadata i32 %shl, metadata !18, metadata !DIExpression()), !dbg !20
+  tail call void asm sideeffect "", "~{rax},~{rbx},~{rcx},~{rdx},~{rsi},~{rdi},~{rbp},~{r8},~{r9},~{r10},~{r11},~{r12},~{r13},~{r14},~{r15},~{dirflag},~{fpsr},~{flags}"(), !srcloc !25
+  %2 = load i32, i32* @sc
----------------
You know, we really should create an LLVM intrinsic for this. I would like a target-neutral way to emit a full register mask.


https://reviews.llvm.org/D38229





More information about the llvm-commits mailing list