[llvm] b6a4ab5 - [NFC] Fix #106873 - update assignment tracking docs (#106959)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 2 06:58:04 PDT 2024
Author: Orlando Cazalet-Hyams
Date: 2024-09-02T14:57:59+01:00
New Revision: b6a4ab5a12c9ced0642769e4b2d8f77859541ba8
URL: https://github.com/llvm/llvm-project/commit/b6a4ab5a12c9ced0642769e4b2d8f77859541ba8
DIFF: https://github.com/llvm/llvm-project/commit/b6a4ab5a12c9ced0642769e4b2d8f77859541ba8.diff
LOG: [NFC] Fix #106873 - update assignment tracking docs (#106959)
Added:
Modified:
llvm/docs/AssignmentTracking.md
Removed:
################################################################################
diff --git a/llvm/docs/AssignmentTracking.md b/llvm/docs/AssignmentTracking.md
index a24a8b0d797f87..ae4891236c2591 100644
--- a/llvm/docs/AssignmentTracking.md
+++ b/llvm/docs/AssignmentTracking.md
@@ -20,12 +20,14 @@ LLVM pass writers, and minimal disruption to LLVM in general.
## Status and usage
-**Status**: Experimental work in progress. Enabling is strongly advised against
-except for development and testing.
+**Status**: Enabled by default in Clang but disabled under some circumstances
+(which can be overridden with the `forced` option, see below). `opt` will not
+run the pass unless asked (`-passes=declare-to-assign`).
-**Enable in Clang**: `-Xclang -fexperimental-assignment-tracking`
+**Flag**:
+`-Xclang -fexperimental-assignment-tracking=<disabled|enabled|forced>`
-That causes Clang to get LLVM to run the pass `declare-to-assign`. The pass
+When enabled Clang gets LLVM to run the pass `declare-to-assign`. The pass
converts conventional debug records to assignment tracking metadata and sets
the module flag `debug-info-assignment-tracking` to the value `i1 true`. To
check whether assignment tracking is enabled for a module call
@@ -88,7 +90,7 @@ int fun(int a) {
```
compiled without optimisations:
```
-$ clang++ test.cpp -o test.ll -emit-llvm -S -g -O0 -Xclang -fexperimental-assignment-tracking
+$ clang++ test.cpp -o test.ll -emit-llvm -S -g -O0 -Xclang -fexperimental-assignment-tracking=enabled
```
we get:
```
@@ -194,8 +196,7 @@ the choice at each instruction, iteratively joining the results for each block.
### TODO list
-As this is an experimental work in progress so there are some items we still need
-to tackle:
+Outstanding improvements:
* As mentioned in test llvm/test/DebugInfo/assignment-tracking/X86/diamond-3.ll,
the analysis should treat escaping calls like untagged stores.
@@ -228,3 +229,8 @@ to tackle:
that we can only track assignments with fixed offsets and sizes, I think we
can probably get rid of the address and address-expression part, since it
will always be computable with the info we have.
+
+* Assignment tracking is disabled by default for LTO and thinLTO builds, and
+ if LLDB debugger tuning has been specified. We should remove these
+ restrictions. See EmitAssemblyHelper::RunOptimizationPipeline in
+ clang/lib/CodeGen/BackendUtil.cpp.
More information about the llvm-commits
mailing list