[llvm] [RemoveDIs] Add documentation for IR debug records (PR #81156)

Felipe de Azevedo Piovezan via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 8 09:38:53 PST 2024


================
@@ -268,6 +279,60 @@ The formal LLVM-IR signature is:
 
 See :doc:`AssignmentTracking` for more info.
 
+.. _debug_records:
+
+Debug Records
+----------------------------
+
+LLVM also has an alternative to intrinsic functions, debug records, which
+function similarly but are not instructions. The basic syntax for debug records
+is:
+
+.. code-block:: llvm
+
+  call void llvm.dbg.<type>([metadata <arg>, ]*), !dbg <DILocation> ; Intrinsic model
----------------
felipepiovezan wrote:

It feels wrong to say "the syntax for debug records is"  and then the first thing we show is _not_ a debug record.

Suggestion: remove all comments, move this line down and add a comment in the middle

```
#dbg_<type>([<arg>, ]*, <DILocation>)
; Using the intrinsic model, the above is equivalent to:
call void llvm.dbg.<type>([metadata <arg>, ]*), !dbg <DILocation>
```

https://github.com/llvm/llvm-project/pull/81156


More information about the llvm-commits mailing list