[PATCH] D49053: [WIP][Docs] Debugging optimized code with debugify

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 11 09:38:24 PDT 2018


vsk added a comment.

This looks really close, thanks! Phabricator is rendering all of the code blocks correctly -- there doesn't seem to be a formatting issue on this end.



================
Comment at: docs/SourceLevelDebugging.rst:1468
+
+Debugging optimized code
+========================
----------------
I don't know how I missed this earlier, but I think the title should be a little more specific. This section is more about 'testing optimizations with debug info', than it is about actually debugging optimized code.


================
Comment at: docs/SourceLevelDebugging.rst:1563
+also capable of changing the DWARF expression used by the debugger to describe the variable.
+It also prevents use-before-def my moving instructions.
+
----------------
'my moving instructions' -> 'salvaging or deleting invalid debug values'


================
Comment at: docs/SourceLevelDebugging.rst:1634
+Here we test that the two ``dbg.value`` instrinsics are preserved and
+are correctly pointing to the ``[[C]]`` and ``[[D]]`` variables.
----------------
I still think we should add a caveat here. In order to write this type of regression test in a way that's not brittle, it's important to avoid hardcoding line/variable numbers in check lines (please explain why). In cases where that can't be avoided (say, if a test wouldn't be precise enough), it's a good practice to move the test into its own file.


Repository:
  rL LLVM

https://reviews.llvm.org/D49053





More information about the llvm-commits mailing list