[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
+ #dbg_<type>([<arg>, ]*, <DILocation>) ; Record model
+
+A debug intrinsic function can therefore be converted to a debug record with the
+following steps:
+
+1. Add an extra level of indentation.
+2. Replace everything prior to the intrinsic type (declare/value/assign) with
----------------
felipepiovezan wrote:
Another motivation to remove "type": here, "intrinsic type" may lead one to think of the `void` prior to the intrinsic name.
https://github.com/llvm/llvm-project/pull/81156
More information about the llvm-commits
mailing list