diff options
author | Vedant Kumar <vsk@apple.com> | 2017-12-08 21:57:28 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2017-12-08 21:57:28 +0000 |
commit | 2cac108e9753326b180ea630bd6272eaacfe80a5 (patch) | |
tree | bf2a5cb6015cd56774ab6ac76e36d3b866510220 /docs/ReleaseNotes.rst | |
parent | 976af3f5de33b23aeabdfe92e6089782124f9b62 (diff) |
[Debugify] Add a pass to test debug info preservation
The Debugify pass synthesizes debug info for IR. It's paired with a
CheckDebugify pass which determines how much of the original debug info
is preserved. These passes make it easier to create targeted tests for
debug info preservation.
Here is the Debugify algorithm:
NextLine = 1
for (Instruction &I : M)
attach DebugLoc(NextLine++) to I
NextVar = 1
for (Instruction &I : M)
if (canAttachDebugValue(I))
attach dbg.value(NextVar++) to I
The CheckDebugify pass expects contiguous ranges of DILocations and
DILocalVariables. If it fails to find all of the expected debug info, it
prints a specific error to stderr which can be FileChecked.
This was discussed on llvm-dev in the thread:
"Passes to add/validate synthetic debug info"
Differential Revision: https://reviews.llvm.org/D40512
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320202 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/ReleaseNotes.rst')
-rw-r--r-- | docs/ReleaseNotes.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst index 4b6d7931e84..41b9cf92d76 100644 --- a/docs/ReleaseNotes.rst +++ b/docs/ReleaseNotes.rst @@ -49,6 +49,11 @@ Non-comprehensive list of changes in this release the name used in the `def X : Target` definition to the call to `RegisterTarget`. +* The ``Debugify`` pass was added to ``opt`` to facilitate testing of debug + info preservation. This pass attaches synthetic ``DILocations`` and + ``DIVariables`` to the instructions in a ``Module``. The ``CheckDebugify`` + pass determines how much of the metadata is lost. + * Note.. .. NOTE |