Skip to content

Commit 76bf8a0

Browse files
committed
Add debug_value [trace] to SIL.rst
1 parent 87d7237 commit 76bf8a0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/SIL.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3804,7 +3804,7 @@ debug_value
38043804

38053805
::
38063806

3807-
sil-instruction ::= debug_value '[poison]'? '[moved]'? sil-operand (',' debug-var-attr)* advanced-debug-var-attr* (',' 'expr' debug-info-expr)?
3807+
sil-instruction ::= debug_value '[poison]'? '[moved]'? '[trace]'? sil-operand (',' debug-var-attr)* advanced-debug-var-attr* (',' 'expr' debug-info-expr)?
38083808

38093809
debug_value %1 : $Int
38103810

@@ -3910,6 +3910,8 @@ It is worth noting that a SIL DIExpression is similar to
39103910
info metadata. While LLVM represents ``!DIExpression`` are a list of 64-bit integers,
39113911
SIL DIExpression can have elements with various types, like AST nodes or strings.
39123912

3913+
The ``[trace]`` flag is available for compiler unit testing. It is not produced during normal compilation. It is used combination with internal logging and optimization controls to select specific values to trace or to transform. For example, liveness analysis combines all "traced" values into a single live range with multiple definitions. This exposes corner cases that cannot be represented by passing valid SIL through the pipeline.
3914+
39133915
Profiling
39143916
~~~~~~~~~
39153917

0 commit comments

Comments
 (0)