[PATCH] D35953: [LiveDebugVariables] Use lexical scope to trim debug value live intervals

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 27 11:50:06 PDT 2017


aprantl added inline comments.


================
Comment at: lib/CodeGen/LiveDebugVariables.cpp:107
 
+  // Set of interval start indexes that have been trimmed to the
+  // lexical scope.
----------------
`///`


================
Comment at: lib/CodeGen/LiveDebugVariables.cpp:694
+
+  if (!dl->getInlinedAt())
+    return;
----------------
Why only do this for inlined variables? Couldn't non-inlined variables also benefit from being trimmed at their lexical scope's end? Or is this situation impossible for non-inlined variables?


================
Comment at: lib/CodeGen/LiveDebugVariables.cpp:704
+
+  for(const InsnRange &R : Scope->getRanges()) {
+    SlotIndex RStart = LIS.getInstructionIndex(*R.first);
----------------
Can you add a high-level comment here what the loop is doing?


https://reviews.llvm.org/D35953





More information about the llvm-commits mailing list