[llvm] [LangRef] Clarify definition of fragments and debug intrinsics (PR #82019)
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 16 16:24:29 PST 2024
================
@@ -417,8 +448,9 @@ values through compilation, when objects are promoted to SSA values an
``llvm.dbg.value`` intrinsic is created for each assignment, recording the
variable's new location. Compared with the ``llvm.dbg.declare`` intrinsic:
-* A dbg.value terminates the effect of any preceding dbg.values for (any
- overlapping fragments of) the specified variable.
+* A dbg.value terminates the effect of any preceding dbg.values for any
+ spatially overlapping variables or fragments of the specified variable or
----------------
adrian-prantl wrote:
The way this is worded sounds as if in this example:
```
%1 = ...
call llvm.dbg.value(metadata %1, DILocalVariable("x"), DIExpression())
%2 = ...
call llvm.dbg.value(metadata %1, DILocalVariable("y"), DIExpression())
```
The second intrinsic ends the range of "x", but that's not the case. It only terminates it if it refers to the _same_ variable or a fragment of it.
https://github.com/llvm/llvm-project/pull/82019
More information about the llvm-commits
mailing list