[llvm] [Docs][DebugInfo][RemoveDIs] Document some debug-info transition info (PR #79167)
J. Ryan Stinnett via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 23 09:08:37 PST 2024
================
@@ -0,0 +1,106 @@
+# What's all this then?
+
+We're planning on removing debug-info intrinsics from LLVM, as they're slow, unweildy and can confuse optimisation passes if they're not expecting them. Instead of having a sequence of instructions that looks like this:
+
+```text
+ %add = add i32 %foo, %bar
+ call void @llvm.dbg.value(metadata %add, ...
+ %sub = sub i32 %add, %tosub
+ call void @llvm.dbg.value(metadata %sub, ...
+ call void @a_normal_function()
+```
+
+with dbg.value intrinsics representing debug-info records, it would instead be printed as:
+
+```text
+ %add = add i32 %foo, %bar
+ #dbg_value(%add, ...
+ %sub = sub i32 %add, %tosub
+ #dbg_value(%sub, ...
+ call void @a_normal_function()
+```
+
+Where the debug records are not instructions, do not appear in the instruction list, and won't appear in your optimisation passes unless you go digging for them deliberately.
----------------
jryans wrote:
Maybe drop "Where" and just start a new sentence?
```suggestion
The debug records are not instructions, do not appear in the instruction list, and won't appear in your optimisation passes unless you go digging for them deliberately.
```
https://github.com/llvm/llvm-project/pull/79167
More information about the llvm-commits
mailing list