<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/docs/RemoveDIsDebugInfo.md, branch users/nico/python-2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[Docs][DebugInfo] Summarise what people need to do for RemoveDIs now (#124725)</title>
<updated>2025-01-28T11:31:15+00:00</updated>
<author>
<name>Jeremy Morse</name>
<email>jeremy.morse@sony.com</email>
</author>
<published>2025-01-28T11:31:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=65f81df473904d2df2b9eaa91ff4fcbe69f8fb00'/>
<id>65f81df473904d2df2b9eaa91ff4fcbe69f8fb00</id>
<content type='text'>
Replace the "what I need to do" section of the RemoveDIs docs with a
paragraph about preserving start-of-block iterators. Hopefully this is
concise enough to remain in peoples heads going forwards!</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace the "what I need to do" section of the RemoveDIs docs with a
paragraph about preserving start-of-block iterators. Hopefully this is
concise enough to remain in peoples heads going forwards!</pre>
</div>
</content>
</entry>
<entry>
<title>[LLVM-C] Add bindings to `Instruction::getDbgRecordRange()` (#107802)</title>
<updated>2024-09-20T13:34:42+00:00</updated>
<author>
<name>Michal Rostecki</name>
<email>vadorovsky@protonmail.com</email>
</author>
<published>2024-09-20T13:34:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c320df4a2c9d7be10caea9a423d2bfbdcaae6a39'/>
<id>c320df4a2c9d7be10caea9a423d2bfbdcaae6a39</id>
<content type='text'>
Since the migration from `@llvm.dbg.value` intrinsic to `#dbg_value`
records, there is no way to retrieve the debug records for an
`Instruction` in LLVM-C API.

Previously, with debug info intrinsics, retrieving debug info for an
`Instruction` could be done with `LLVMGetNextInstructions`, because the
intrinsic call was also an instruction.

However, to be able to retrieve debug info with the current LLVM, where
debug records are used, the `getDbgRecordRange()` iterator needs to be
exposed.

Add new functions for DbgRecord sequence traversal:
  LLVMGetFirstDbgRecord
  LLVMGetLastDbgRecord
  LLVMGetNextDbgRecord
  LLVMGetPreviousDbgRecord

See llvm/docs/RemoveDIsDebugInfo.md and release notes.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the migration from `@llvm.dbg.value` intrinsic to `#dbg_value`
records, there is no way to retrieve the debug records for an
`Instruction` in LLVM-C API.

Previously, with debug info intrinsics, retrieving debug info for an
`Instruction` could be done with `LLVMGetNextInstructions`, because the
intrinsic call was also an instruction.

However, to be able to retrieve debug info with the current LLVM, where
debug records are used, the `getDbgRecordRange()` iterator needs to be
exposed.

Add new functions for DbgRecord sequence traversal:
  LLVMGetFirstDbgRecord
  LLVMGetLastDbgRecord
  LLVMGetNextDbgRecord
  LLVMGetPreviousDbgRecord

See llvm/docs/RemoveDIsDebugInfo.md and release notes.</pre>
</div>
</content>
</entry>
<entry>
<title>[RemoveDIs] Update DIBuilder C API with DbgRecord functions. (#95535)</title>
<updated>2024-06-18T07:39:36+00:00</updated>
<author>
<name>Carlos Alberto Enciso</name>
<email>Carlos.Enciso@sony.com</email>
</author>
<published>2024-06-18T07:39:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=db394edf95e7e47e2a11c570d65a8f5005af7849'/>
<id>db394edf95e7e47e2a11c570d65a8f5005af7849</id>
<content type='text'>
The DIBuilder C API was changed to deal with DbgRecord functions:

https://github.com/llvm/llvm-project/pull/84915
https://github.com/llvm/llvm-project/pull/85657
https://github.com/llvm/llvm-project/pull/92417#issuecomment-2120078326

As discussed by @nikic and @OCHyams:

https://github.com/llvm/llvm-project/pull/92417#issuecomment-2144505440

&gt; For the intrinsic-inserting functions, do you think we should:
&gt;
&gt; a) mark as deprecated but otherwise leave them alone for now.
&gt; b) mark as deprecated and change their behaviour so that they
&gt;    do nothing and return nullptr.
&gt; c) outright delete them (it sounds like you're voting this one,
&gt;    but just wanted to double check).

This patch implements option (c).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The DIBuilder C API was changed to deal with DbgRecord functions:

https://github.com/llvm/llvm-project/pull/84915
https://github.com/llvm/llvm-project/pull/85657
https://github.com/llvm/llvm-project/pull/92417#issuecomment-2120078326

As discussed by @nikic and @OCHyams:

https://github.com/llvm/llvm-project/pull/92417#issuecomment-2144505440

&gt; For the intrinsic-inserting functions, do you think we should:
&gt;
&gt; a) mark as deprecated but otherwise leave them alone for now.
&gt; b) mark as deprecated and change their behaviour so that they
&gt;    do nothing and return nullptr.
&gt; c) outright delete them (it sounds like you're voting this one,
&gt;    but just wanted to double check).

This patch implements option (c).</pre>
</div>
</content>
</entry>
<entry>
<title>[RemoveDIs] Update migration doc to explain how to handle textual IR updates (#91725)</title>
<updated>2024-06-10T14:13:22+00:00</updated>
<author>
<name>Stephen Tozer</name>
<email>stephen.tozer@sony.com</email>
</author>
<published>2024-06-10T14:13:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e19199bd9c9146a79673d2c7fb7b09d1f91a77af'/>
<id>e19199bd9c9146a79673d2c7fb7b09d1f91a77af</id>
<content type='text'>
Related review: https://github.com/llvm/llvm-project/pull/91724

This patch updates the RemoveDIs migration document to include details
on the textual IR changes, including steps to update any downstream lit
tests accordingly. These steps are the same as those used to update the
lit tests in the LLVM/Clang lit tests, as detailed in the review linked
above.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Related review: https://github.com/llvm/llvm-project/pull/91724

This patch updates the RemoveDIs migration document to include details
on the textual IR changes, including steps to update any downstream lit
tests accordingly. These steps are the same as those used to update the
lit tests in the LLVM/Clang lit tests, as detailed in the review linked
above.</pre>
</div>
</content>
</entry>
<entry>
<title>[RemoveDIs] C API: Add before-dbg-record versions of IRBuilder position funcs (#92417)</title>
<updated>2024-06-10T08:21:40+00:00</updated>
<author>
<name>Orlando Cazalet-Hyams</name>
<email>orlando.hyams@sony.com</email>
</author>
<published>2024-06-10T08:21:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d732a3298a70d83e5571c594de9be63df85668a7'/>
<id>d732a3298a70d83e5571c594de9be63df85668a7</id>
<content type='text'>
Add `LLVMPositionBuilderBeforeDbgRecords` and
`LLVMPositionBuilderBeforeInstrAndDbgRecords` to `llvm/include/llvm-c/Core.h`
which behave the same as `LLVMPositionBuilder` and `LVMPositionBuilderBefore`
except that the position is set before debug records attached to the target
instruction (the existing functions set the insertion point to after any
attached debug records).

More info on debug records and the migration towards using them can be found
here: https://llvm.org/docs/RemoveDIsDebugInfo.html

The distinction is important in some situations. An important example is when
inserting a phi before another instruction which has debug records attached to
it (these come "before" the instruction). Inserting before the instruction but
after the debug records would result in having debug records before a phi, which
is illegal. That results in an assertion failure:

`llvm/lib/IR/Instruction.cpp:166: Assertion '!isa&lt;PHINode&gt;(this) &amp;&amp; "Inserting
PHI after debug-records!"' failed.`

In llvm (C++) we've added bit to instruction iterators that carries around the
extra information. Adding dedicated functions seemed like the least invasive and
least suprising way to update the C API.

Update llvm/tools/llvm-c-test/debuginfo.c to test this functionality.

Update the OCaml bindings, the migration docs and release notes.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add `LLVMPositionBuilderBeforeDbgRecords` and
`LLVMPositionBuilderBeforeInstrAndDbgRecords` to `llvm/include/llvm-c/Core.h`
which behave the same as `LLVMPositionBuilder` and `LVMPositionBuilderBefore`
except that the position is set before debug records attached to the target
instruction (the existing functions set the insertion point to after any
attached debug records).

More info on debug records and the migration towards using them can be found
here: https://llvm.org/docs/RemoveDIsDebugInfo.html

The distinction is important in some situations. An important example is when
inserting a phi before another instruction which has debug records attached to
it (these come "before" the instruction). Inserting before the instruction but
after the debug records would result in having debug records before a phi, which
is illegal. That results in an assertion failure:

`llvm/lib/IR/Instruction.cpp:166: Assertion '!isa&lt;PHINode&gt;(this) &amp;&amp; "Inserting
PHI after debug-records!"' failed.`

In llvm (C++) we've added bit to instruction iterators that carries around the
extra information. Adding dedicated functions seemed like the least invasive and
least suprising way to update the C API.

Update llvm/tools/llvm-c-test/debuginfo.c to test this functionality.

Update the OCaml bindings, the migration docs and release notes.</pre>
</div>
</content>
</entry>
<entry>
<title>[DebugInfo][RemoveDIs] Add documentation for updating code to handle debug records (#93562)</title>
<updated>2024-05-30T16:25:51+00:00</updated>
<author>
<name>Stephen Tozer</name>
<email>stephen.tozer@sony.com</email>
</author>
<published>2024-05-30T16:25:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a8e03aed6ab2675b8d19f93657edc48c82e93625'/>
<id>a8e03aed6ab2675b8d19f93657edc48c82e93625</id>
<content type='text'>
Although the patch that enables debug records by default has been
temporarily reverted, it will (eventually) be reverted and everyone's
code will be subjected to the new debug info format. Although this is
broadly a good thing, it is important that the documentation has enough
information to guide users through the update; this patch adds what
should hopefully be enough detail for most users to either find the
answers, or find out how to find those answers.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Although the patch that enables debug records by default has been
temporarily reverted, it will (eventually) be reverted and everyone's
code will be subjected to the new debug info format. Although this is
broadly a good thing, it is important that the documentation has enough
information to guide users through the update; this patch adds what
should hopefully be enough detail for most users to either find the
answers, or find out how to find those answers.</pre>
</div>
</content>
</entry>
<entry>
<title>[RemoveDIs] Update DIBuilder C API and OCaml bindings [2/2] (#86529)</title>
<updated>2024-03-28T08:54:27+00:00</updated>
<author>
<name>Orlando Cazalet-Hyams</name>
<email>orlando.hyams@sony.com</email>
</author>
<published>2024-03-28T08:54:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2a2fd488b6bc1f3df7a8c103f53fec8bf849da4a'/>
<id>2a2fd488b6bc1f3df7a8c103f53fec8bf849da4a</id>
<content type='text'>
Follow on from #84915 which adds the DbgRecord function variants. The C API
changes were reviewed in #85657.

# C API

Update the LLVMDIBuilderInsert... functions to insert DbgRecords instead
of debug intrinsics.

    LLVMDIBuilderInsertDeclareBefore
    LLVMDIBuilderInsertDeclareAtEnd
    LLVMDIBuilderInsertDbgValueBefore
    LLVMDIBuilderInsertDbgValueAtEnd

Calling these functions will now cause an assertion if the module is in the
wrong debug info format. They should only be used when the module is in "new
debug format".

Use LLVMIsNewDbgInfoFormat to query and LLVMSetIsNewDbgInfoFormat to change the
debug info format of a module.

Please see https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-change
(RemoveDIsDebugInfo.md) for more info.

# OCaml bindings

Add set_is_new_dbg_info_format and is_new_dbg_info_format to the OCaml bindings.
These can be used to set and query the current debug info mode. These will
eventually be removed, but are useful while we're transitioning between old and
new debug info formats.

Add string_of_lldbgrecord, like string_of_llvalue but prints DbgRecords.

In test dbginfo.ml, unconditionally set the module debug info to the new mode
and update CHECK lines to check for DbgRecords. Without this change the test
crashes because it attempts to insert DbgRecords (new default behaviour of
llvm_dibuild_insert_declare_...) into a module that is in the old debug info
mode.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Follow on from #84915 which adds the DbgRecord function variants. The C API
changes were reviewed in #85657.

# C API

Update the LLVMDIBuilderInsert... functions to insert DbgRecords instead
of debug intrinsics.

    LLVMDIBuilderInsertDeclareBefore
    LLVMDIBuilderInsertDeclareAtEnd
    LLVMDIBuilderInsertDbgValueBefore
    LLVMDIBuilderInsertDbgValueAtEnd

Calling these functions will now cause an assertion if the module is in the
wrong debug info format. They should only be used when the module is in "new
debug format".

Use LLVMIsNewDbgInfoFormat to query and LLVMSetIsNewDbgInfoFormat to change the
debug info format of a module.

Please see https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-change
(RemoveDIsDebugInfo.md) for more info.

# OCaml bindings

Add set_is_new_dbg_info_format and is_new_dbg_info_format to the OCaml bindings.
These can be used to set and query the current debug info mode. These will
eventually be removed, but are useful while we're transitioning between old and
new debug info formats.

Add string_of_lldbgrecord, like string_of_llvalue but prints DbgRecords.

In test dbginfo.ml, unconditionally set the module debug info to the new mode
and update CHECK lines to check for DbgRecords. Without this change the test
crashes because it attempts to insert DbgRecords (new default behaviour of
llvm_dibuild_insert_declare_...) into a module that is in the old debug info
mode.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[RemoveDIs] Update DIBuilder C API with DbgRecord functions [2/2] (#85657)"</title>
<updated>2024-03-22T16:21:50+00:00</updated>
<author>
<name>Orlando Cazalet-Hyams</name>
<email>orlando.hyams@sony.com</email>
</author>
<published>2024-03-22T16:21:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=26857582e5ee7980a71133ef8f8f579bcd90bdc8'/>
<id>26857582e5ee7980a71133ef8f8f579bcd90bdc8</id>
<content type='text'>
This reverts commit 2091c74796b1dac68e622284c63a870b88b7554f.

Builtbot failure: https://lab.llvm.org/buildbot/#/builders/16/builds/63080
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 2091c74796b1dac68e622284c63a870b88b7554f.

Builtbot failure: https://lab.llvm.org/buildbot/#/builders/16/builds/63080
</pre>
</div>
</content>
</entry>
<entry>
<title>[RemoveDIs] Update DIBuilder C API with DbgRecord functions [2/2] (#85657)</title>
<updated>2024-03-22T15:47:40+00:00</updated>
<author>
<name>Orlando Cazalet-Hyams</name>
<email>orlando.hyams@sony.com</email>
</author>
<published>2024-03-22T15:47:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2091c74796b1dac68e622284c63a870b88b7554f'/>
<id>2091c74796b1dac68e622284c63a870b88b7554f</id>
<content type='text'>
Follow on from #84915 which adds the DbgRecord function variants.

Update the LLVMDIBuilderInsert... functions to insert DbgRecords instead
of debug intrinsics.

    LLVMDIBuilderInsertDeclareBefore
    LLVMDIBuilderInsertDeclareAtEnd
    LLVMDIBuilderInsertDbgValueBefore
    LLVMDIBuilderInsertDbgValueAtEnd

Calling these functions will now cause an assertion if the module is in the
wrong debug info format. They should only be used when the module is in "new
debug format".

Use LLVMIsNewDbgInfoFormat to query and LLVMSetIsNewDbgInfoFormat to change the
debug info format of a module.

Please see https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-change
(RemoveDIsDebugInfo.md) for more info.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Follow on from #84915 which adds the DbgRecord function variants.

Update the LLVMDIBuilderInsert... functions to insert DbgRecords instead
of debug intrinsics.

    LLVMDIBuilderInsertDeclareBefore
    LLVMDIBuilderInsertDeclareAtEnd
    LLVMDIBuilderInsertDbgValueBefore
    LLVMDIBuilderInsertDbgValueAtEnd

Calling these functions will now cause an assertion if the module is in the
wrong debug info format. They should only be used when the module is in "new
debug format".

Use LLVMIsNewDbgInfoFormat to query and LLVMSetIsNewDbgInfoFormat to change the
debug info format of a module.

Please see https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-change
(RemoveDIsDebugInfo.md) for more info.</pre>
</div>
</content>
</entry>
<entry>
<title>[RemoveDIs][NFC] Rename DPMarker-&gt;DbgMarker (#85931)</title>
<updated>2024-03-20T16:00:10+00:00</updated>
<author>
<name>Stephen Tozer</name>
<email>stephen.tozer@sony.com</email>
</author>
<published>2024-03-20T16:00:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=75dfa58ea93aa93b97534906778cb3dd24ba841a'/>
<id>75dfa58ea93aa93b97534906778cb3dd24ba841a</id>
<content type='text'>
Another trivial rename patch, the last big one for now, which renamed
DPMarkers to DbgMarkers. This required the field `DbgMarker` in
`Instruction` to be renamed to `DebugMarker` to avoid a clash, but
otherwise was a simple string substitution of `s/DPMarker/DbgMarker` and
a manual renaming of `DPM` to `DM` in the few places where that acronym
was used for debug markers.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Another trivial rename patch, the last big one for now, which renamed
DPMarkers to DbgMarkers. This required the field `DbgMarker` in
`Instruction` to be renamed to `DebugMarker` to avoid a clash, but
otherwise was a simple string substitution of `s/DPMarker/DbgMarker` and
a manual renaming of `DPM` to `DM` in the few places where that acronym
was used for debug markers.</pre>
</div>
</content>
</entry>
</feed>
