[llvm] [DLCov 1/5] Add CMake option to enable enhanced line number coverage tracking (PR #107278)

Stephen Tozer via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 4 12:48:47 PDT 2024


https://github.com/SLTozer updated https://github.com/llvm/llvm-project/pull/107278

>From 1efbd38db2179d36eb7a24c4bebd2a8052af71b5 Mon Sep 17 00:00:00 2001
From: Stephen Tozer <stephen.tozer at sony.com>
Date: Wed, 4 Sep 2024 12:09:50 +0100
Subject: [PATCH 1/4] Add CMake option to enable expensive line number origin
 tracking

---
 llvm/CMakeLists.txt                        |  4 ++++
 llvm/cmake/modules/HandleLLVMOptions.cmake | 12 ++++++++++++
 llvm/docs/CMake.rst                        | 11 +++++++++++
 llvm/include/llvm/Config/config.h.cmake    |  4 ++++
 4 files changed, 31 insertions(+)

diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 0044c38f566a78..98d3700391dd69 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -536,6 +536,10 @@ endif()
 
 option(LLVM_ENABLE_CRASH_DUMPS "Turn on memory dumps on crashes. Currently only implemented on Windows." OFF)
 
+set(LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING "DISABLED" CACHE STRING
+  "Enhance debugify's line number coverage tracking; enabling this is abi-breaking. Can be DISABLED, COVERAGE, or COVERAGE_AND_ORIGIN.")
+set_property(CACHE LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING PROPERTY STRINGS DISABLED COVERAGE COVERAGE_AND_ORIGIN)
+
 set(WINDOWS_PREFER_FORWARD_SLASH_DEFAULT OFF)
 if (MINGW)
   # Cygwin doesn't identify itself as Windows, and thus gets path::Style::posix
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index e17e2169cd880f..bf98b76c159c95 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -196,6 +196,18 @@ else()
   message(FATAL_ERROR "Unknown value for LLVM_ABI_BREAKING_CHECKS: \"${LLVM_ABI_BREAKING_CHECKS}\"!")
 endif()
 
+string(TOUPPER "${LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING}" uppercase_LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING)
+
+if( uppercase_LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING STREQUAL "COVERAGE" )
+  set( ENABLE_DEBUGLOC_COVERAGE_TRACKING 1 )
+elseif( uppercase_LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING STREQUAL "COVERAGE_AND_ORIGIN" )
+  message(FATAL_ERROR "\"COVERAGE_AND_ORIGIN\" setting for LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING currently unimplemented.")
+elseif( uppercase_LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING STREQUAL "DISABLED" OR NOT DEFINED LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING )
+  # The DISABLED setting is default and requires no additional defines.
+else()
+  message(FATAL_ERROR "Unknown value for LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING: \"${LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING}\"!")
+endif()
+
 if( LLVM_REVERSE_ITERATION )
   set( LLVM_ENABLE_REVERSE_ITERATION 1 )
 endif()
diff --git a/llvm/docs/CMake.rst b/llvm/docs/CMake.rst
index 321bae48594cf9..caf88b4f8fc645 100644
--- a/llvm/docs/CMake.rst
+++ b/llvm/docs/CMake.rst
@@ -480,6 +480,17 @@ enabled sub-projects. Nearly all of these variable names begin with
 **LLVM_ENABLE_BINDINGS**:BOOL
   If disabled, do not try to build the OCaml bindings.
 
+**LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING**:STRING
+  Enhances Debugify's ability to detect line number errors by storing extra
+  information inside Instructions, removing false positives from Debugify's
+  results at the cost of performance. Allowed values are `DISABLED` (default),
+  `COVERAGE`, and `COVERAGE_AND_ORIGIN`. `COVERAGE` tracks whether and why a
+  line number was intentionally dropped or not generated for an instruction,
+  allowing Debugify to avoid reporting these as errors. `COVERAGE_AND_ORIGIN`
+  additionally stores a stacktrace of the point where each DebugLoc is
+  unintentionally dropped, allowing for much easier bug triaging at the cost of
+  a ~10x performance slowdown.
+
 **LLVM_ENABLE_DIA_SDK**:BOOL
   Enable building with MSVC DIA SDK for PDB debugging support. Available
   only with MSVC. Defaults to ON.
diff --git a/llvm/include/llvm/Config/config.h.cmake b/llvm/include/llvm/Config/config.h.cmake
index 4c9404d95daf8d..3e6b94dfbe5458 100644
--- a/llvm/include/llvm/Config/config.h.cmake
+++ b/llvm/include/llvm/Config/config.h.cmake
@@ -19,6 +19,10 @@
 /* Define to 1 to enable crash memory dumps, and to 0 otherwise. */
 #cmakedefine01 LLVM_ENABLE_CRASH_DUMPS
 
+/* Define to 1 to enable expensive checks for debug location coverage checking,
+   and to 0 otherwise. */
+#cmakedefine01 ENABLE_DEBUGLOC_COVERAGE_TRACKING
+
 /* Define to 1 to prefer forward slashes on Windows, and to 0 prefer
    backslashes. */
 #cmakedefine01 LLVM_WINDOWS_PREFER_FORWARD_SLASH

>From 0348ab967c00d4badfcca2e9408146add2515bed Mon Sep 17 00:00:00 2001
From: Stephen Tozer <stephen.tozer at sony.com>
Date: Thu, 26 Sep 2024 13:54:53 +0100
Subject: [PATCH 2/4] Update comments

---
 llvm/CMakeLists.txt                         |  2 +-
 llvm/docs/CMake.rst                         |  4 +-
 llvm/test/Transforms/InstCombine/reduced.ll | 69 +++++++++++++++++++++
 3 files changed, 72 insertions(+), 3 deletions(-)
 create mode 100644 llvm/test/Transforms/InstCombine/reduced.ll

diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 98d3700391dd69..717115a850c9c7 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -537,7 +537,7 @@ endif()
 option(LLVM_ENABLE_CRASH_DUMPS "Turn on memory dumps on crashes. Currently only implemented on Windows." OFF)
 
 set(LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING "DISABLED" CACHE STRING
-  "Enhance debugify's line number coverage tracking; enabling this is abi-breaking. Can be DISABLED, COVERAGE, or COVERAGE_AND_ORIGIN.")
+  "Enhance Debugify's line number coverage tracking; enabling this is ABI-breaking. Can be DISABLED, COVERAGE, or COVERAGE_AND_ORIGIN.")
 set_property(CACHE LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING PROPERTY STRINGS DISABLED COVERAGE COVERAGE_AND_ORIGIN)
 
 set(WINDOWS_PREFER_FORWARD_SLASH_DEFAULT OFF)
diff --git a/llvm/docs/CMake.rst b/llvm/docs/CMake.rst
index caf88b4f8fc645..96766f325ce2c3 100644
--- a/llvm/docs/CMake.rst
+++ b/llvm/docs/CMake.rst
@@ -487,9 +487,9 @@ enabled sub-projects. Nearly all of these variable names begin with
   `COVERAGE`, and `COVERAGE_AND_ORIGIN`. `COVERAGE` tracks whether and why a
   line number was intentionally dropped or not generated for an instruction,
   allowing Debugify to avoid reporting these as errors. `COVERAGE_AND_ORIGIN`
-  additionally stores a stacktrace of the point where each DebugLoc is
+  additionally stores a stack trace of the point where each DebugLoc is
   unintentionally dropped, allowing for much easier bug triaging at the cost of
-  a ~10x performance slowdown.
+  a ~10x performance slowdown. ABI-breaking.
 
 **LLVM_ENABLE_DIA_SDK**:BOOL
   Enable building with MSVC DIA SDK for PDB debugging support. Available
diff --git a/llvm/test/Transforms/InstCombine/reduced.ll b/llvm/test/Transforms/InstCombine/reduced.ll
new file mode 100644
index 00000000000000..779fa85a415cc7
--- /dev/null
+++ b/llvm/test/Transforms/InstCombine/reduced.ll
@@ -0,0 +1,69 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+;; Tests that we do not always overwrite 
+; RUN: opt < %s -passes=instcombine -S | FileCheck %s
+
+define void @test(ptr %xfA, ptr %xfB, i1 %cmp5) {
+; CHECK-LABEL: define void @test(
+; CHECK-SAME: ptr [[XFA:%.*]], ptr [[XFB:%.*]], i1 [[CMP5:%.*]]) {
+; CHECK-NEXT:  [[ENTRY:.*:]]
+; CHECK-NEXT:    br i1 [[CMP5]], label %[[IF_ELSE:.*]], label %[[IF_THEN6:.*]]
+; CHECK:       [[IF_THEN6]]:
+; CHECK-NEXT:    br label %[[IF_END11:.*]]
+; CHECK:       [[IF_ELSE]]:
+; CHECK-NEXT:    br label %[[IF_END11]]
+; CHECK:       [[IF_END11]]:
+; CHECK-NEXT:    [[XFA_PN:%.*]] = phi ptr [ [[XFA]], %[[IF_ELSE]] ], [ [[XFB]], %[[IF_THEN6]] ]
+; CHECK-NEXT:    [[XF1_SROA_8_0_IN:%.*]] = getelementptr i8, ptr [[XFA_PN]], i64 4, !dbg [[DBG3:![0-9]+]]
+; CHECK-NEXT:    [[XF1_SROA_8_0:%.*]] = load float, ptr [[XF1_SROA_8_0_IN]], align 4
+; CHECK-NEXT:    [[CMP_I:%.*]] = fcmp ugt float [[XF1_SROA_8_0]], 0.000000e+00
+; CHECK-NEXT:    br i1 [[CMP_I]], label %[[IF_END_I:.*]], label %[[IF_THEN_I:.*]]
+; CHECK:       [[IF_THEN_I]]:
+; CHECK-NEXT:    br label %[[IF_END_I]]
+; CHECK:       [[IF_END_I]]:
+; CHECK-NEXT:    ret void
+;
+entry:
+  br i1 %cmp5, label %if.else, label %if.then6
+
+if.then6:                                         ; preds = %entry
+  %xf1.sroa.8.0.xfB.sroa_idx = getelementptr i8, ptr %xfB, i64 4
+  %xf1.sroa.8.0.copyload = load float, ptr %xf1.sroa.8.0.xfB.sroa_idx, align 4, !dbg !3
+  br label %if.end11
+
+if.else:                                          ; preds = %entry
+  %xf1.sroa.8.0.xfA.sroa_idx = getelementptr i8, ptr %xfA, i64 4
+  %xf1.sroa.8.0.copyload494 = load float, ptr %xf1.sroa.8.0.xfA.sroa_idx, align 4, !dbg !7
+  br label %if.end11
+
+if.end11:                                         ; preds = %if.else, %if.then6
+  %xf1.sroa.8.0 = phi float [ %xf1.sroa.8.0.copyload494, %if.else ], [ %xf1.sroa.8.0.copyload, %if.then6 ], !annotation !8
+  %cmp.i = fcmp ugt float %xf1.sroa.8.0, 0.000000e+00
+  br i1 %cmp.i, label %if.end.i, label %if.then.i
+
+if.then.i:                                        ; preds = %if.end11
+  br label %if.end.i
+
+if.end.i:                                         ; preds = %if.then.i, %if.end11
+  ret void
+}
+
+!llvm.dbg.cu = !{!0}
+!llvm.module.flags = !{!2}
+
+!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 20.0.0git", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug)
+!1 = !DIFile(filename: "test.cpp", directory: "/tmp")
+!2 = !{i32 2, !"Debug Info Version", i32 3}
+!3 = !DILocation(line: 63, column: 12, scope: !4)
+!4 = distinct !DISubprogram(name: "operator=", linkageName: "_ZN11btMatrix3x3aSERKS_", scope: null, file: !1, line: 61, type: !5, scopeLine: 62, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !6)
+!5 = distinct !DISubroutineType(types: !6)
+!6 = !{}
+!7 = !DILocation(line: 63, column: 15, scope: !4)
+!8 = !{!"irrelevant metadata"}
+;.
+; CHECK: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: [[META1:![0-9]+]], producer: "{{.*}}clang version {{.*}}", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug)
+; CHECK: [[META1]] = !DIFile(filename: "test.cpp", directory: {{.*}})
+; CHECK: [[DBG3]] = !DILocation(line: 63, scope: [[META4:![0-9]+]])
+; CHECK: [[META4]] = distinct !DISubprogram(name: "operator=", linkageName: "_ZN11btMatrix3x3aSERKS_", scope: null, file: [[META1]], line: 61, type: [[META5:![0-9]+]], scopeLine: 62, spFlags: DISPFlagDefinition, unit: [[META0]], retainedNodes: [[META6:![0-9]+]])
+; CHECK: [[META5]] = distinct !DISubroutineType(types: [[META6]])
+; CHECK: [[META6]] = !{}
+;.

>From 84054b5fc0bf6cc93f8e03ca46a4f6d84e878e28 Mon Sep 17 00:00:00 2001
From: Stephen Tozer <stephen.tozer at sony.com>
Date: Fri, 27 Sep 2024 13:43:02 +0100
Subject: [PATCH 3/4] Expand comment, remove unwanted test

---
 llvm/docs/CMake.rst                         |  9 +--
 llvm/test/Transforms/InstCombine/reduced.ll | 69 ---------------------
 2 files changed, 5 insertions(+), 73 deletions(-)
 delete mode 100644 llvm/test/Transforms/InstCombine/reduced.ll

diff --git a/llvm/docs/CMake.rst b/llvm/docs/CMake.rst
index 96766f325ce2c3..9cdde342c8a7b0 100644
--- a/llvm/docs/CMake.rst
+++ b/llvm/docs/CMake.rst
@@ -486,10 +486,11 @@ enabled sub-projects. Nearly all of these variable names begin with
   results at the cost of performance. Allowed values are `DISABLED` (default),
   `COVERAGE`, and `COVERAGE_AND_ORIGIN`. `COVERAGE` tracks whether and why a
   line number was intentionally dropped or not generated for an instruction,
-  allowing Debugify to avoid reporting these as errors. `COVERAGE_AND_ORIGIN`
-  additionally stores a stack trace of the point where each DebugLoc is
-  unintentionally dropped, allowing for much easier bug triaging at the cost of
-  a ~10x performance slowdown. ABI-breaking.
+  allowing Debugify to avoid reporting these as errors; this comes with a small
+  performance cost of ~0.1%. `COVERAGE_AND_ORIGIN` additionally stores a stack
+  trace of the point where each DebugLoc is unintentionally dropped, allowing
+  for much easier bug triaging at the cost of a ~10x performance slowdown.
+  `COVERAGE` and `COVERAGE_AND_ORIGIN` are both ABI-breaking options.
 
 **LLVM_ENABLE_DIA_SDK**:BOOL
   Enable building with MSVC DIA SDK for PDB debugging support. Available
diff --git a/llvm/test/Transforms/InstCombine/reduced.ll b/llvm/test/Transforms/InstCombine/reduced.ll
deleted file mode 100644
index 779fa85a415cc7..00000000000000
--- a/llvm/test/Transforms/InstCombine/reduced.ll
+++ /dev/null
@@ -1,69 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-;; Tests that we do not always overwrite 
-; RUN: opt < %s -passes=instcombine -S | FileCheck %s
-
-define void @test(ptr %xfA, ptr %xfB, i1 %cmp5) {
-; CHECK-LABEL: define void @test(
-; CHECK-SAME: ptr [[XFA:%.*]], ptr [[XFB:%.*]], i1 [[CMP5:%.*]]) {
-; CHECK-NEXT:  [[ENTRY:.*:]]
-; CHECK-NEXT:    br i1 [[CMP5]], label %[[IF_ELSE:.*]], label %[[IF_THEN6:.*]]
-; CHECK:       [[IF_THEN6]]:
-; CHECK-NEXT:    br label %[[IF_END11:.*]]
-; CHECK:       [[IF_ELSE]]:
-; CHECK-NEXT:    br label %[[IF_END11]]
-; CHECK:       [[IF_END11]]:
-; CHECK-NEXT:    [[XFA_PN:%.*]] = phi ptr [ [[XFA]], %[[IF_ELSE]] ], [ [[XFB]], %[[IF_THEN6]] ]
-; CHECK-NEXT:    [[XF1_SROA_8_0_IN:%.*]] = getelementptr i8, ptr [[XFA_PN]], i64 4, !dbg [[DBG3:![0-9]+]]
-; CHECK-NEXT:    [[XF1_SROA_8_0:%.*]] = load float, ptr [[XF1_SROA_8_0_IN]], align 4
-; CHECK-NEXT:    [[CMP_I:%.*]] = fcmp ugt float [[XF1_SROA_8_0]], 0.000000e+00
-; CHECK-NEXT:    br i1 [[CMP_I]], label %[[IF_END_I:.*]], label %[[IF_THEN_I:.*]]
-; CHECK:       [[IF_THEN_I]]:
-; CHECK-NEXT:    br label %[[IF_END_I]]
-; CHECK:       [[IF_END_I]]:
-; CHECK-NEXT:    ret void
-;
-entry:
-  br i1 %cmp5, label %if.else, label %if.then6
-
-if.then6:                                         ; preds = %entry
-  %xf1.sroa.8.0.xfB.sroa_idx = getelementptr i8, ptr %xfB, i64 4
-  %xf1.sroa.8.0.copyload = load float, ptr %xf1.sroa.8.0.xfB.sroa_idx, align 4, !dbg !3
-  br label %if.end11
-
-if.else:                                          ; preds = %entry
-  %xf1.sroa.8.0.xfA.sroa_idx = getelementptr i8, ptr %xfA, i64 4
-  %xf1.sroa.8.0.copyload494 = load float, ptr %xf1.sroa.8.0.xfA.sroa_idx, align 4, !dbg !7
-  br label %if.end11
-
-if.end11:                                         ; preds = %if.else, %if.then6
-  %xf1.sroa.8.0 = phi float [ %xf1.sroa.8.0.copyload494, %if.else ], [ %xf1.sroa.8.0.copyload, %if.then6 ], !annotation !8
-  %cmp.i = fcmp ugt float %xf1.sroa.8.0, 0.000000e+00
-  br i1 %cmp.i, label %if.end.i, label %if.then.i
-
-if.then.i:                                        ; preds = %if.end11
-  br label %if.end.i
-
-if.end.i:                                         ; preds = %if.then.i, %if.end11
-  ret void
-}
-
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!2}
-
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 20.0.0git", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug)
-!1 = !DIFile(filename: "test.cpp", directory: "/tmp")
-!2 = !{i32 2, !"Debug Info Version", i32 3}
-!3 = !DILocation(line: 63, column: 12, scope: !4)
-!4 = distinct !DISubprogram(name: "operator=", linkageName: "_ZN11btMatrix3x3aSERKS_", scope: null, file: !1, line: 61, type: !5, scopeLine: 62, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !6)
-!5 = distinct !DISubroutineType(types: !6)
-!6 = !{}
-!7 = !DILocation(line: 63, column: 15, scope: !4)
-!8 = !{!"irrelevant metadata"}
-;.
-; CHECK: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: [[META1:![0-9]+]], producer: "{{.*}}clang version {{.*}}", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug)
-; CHECK: [[META1]] = !DIFile(filename: "test.cpp", directory: {{.*}})
-; CHECK: [[DBG3]] = !DILocation(line: 63, scope: [[META4:![0-9]+]])
-; CHECK: [[META4]] = distinct !DISubprogram(name: "operator=", linkageName: "_ZN11btMatrix3x3aSERKS_", scope: null, file: [[META1]], line: 61, type: [[META5:![0-9]+]], scopeLine: 62, spFlags: DISPFlagDefinition, unit: [[META0]], retainedNodes: [[META6:![0-9]+]])
-; CHECK: [[META5]] = distinct !DISubroutineType(types: [[META6]])
-; CHECK: [[META6]] = !{}
-;.

>From 7380c0d75799372c96844e8068df6209de4102e3 Mon Sep 17 00:00:00 2001
From: Stephen Tozer <stephen.tozer at sony.com>
Date: Thu, 3 Oct 2024 14:19:49 +0100
Subject: [PATCH 4/4] Remove references to COVERAGE_AND_ORIGIN option

---
 llvm/CMakeLists.txt                        |  4 ++--
 llvm/cmake/modules/HandleLLVMOptions.cmake |  2 --
 llvm/docs/CMake.rst                        | 13 +++++--------
 3 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 717115a850c9c7..741c95f3a7d02a 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -537,8 +537,8 @@ endif()
 option(LLVM_ENABLE_CRASH_DUMPS "Turn on memory dumps on crashes. Currently only implemented on Windows." OFF)
 
 set(LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING "DISABLED" CACHE STRING
-  "Enhance Debugify's line number coverage tracking; enabling this is ABI-breaking. Can be DISABLED, COVERAGE, or COVERAGE_AND_ORIGIN.")
-set_property(CACHE LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING PROPERTY STRINGS DISABLED COVERAGE COVERAGE_AND_ORIGIN)
+  "Enhance Debugify's line number coverage tracking; enabling this is ABI-breaking. Can be DISABLED, or COVERAGE.")
+set_property(CACHE LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING PROPERTY STRINGS DISABLED COVERAGE)
 
 set(WINDOWS_PREFER_FORWARD_SLASH_DEFAULT OFF)
 if (MINGW)
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index bf98b76c159c95..314f0fca1c4492 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -200,8 +200,6 @@ string(TOUPPER "${LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING}" uppercase_LLVM_ENABLE
 
 if( uppercase_LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING STREQUAL "COVERAGE" )
   set( ENABLE_DEBUGLOC_COVERAGE_TRACKING 1 )
-elseif( uppercase_LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING STREQUAL "COVERAGE_AND_ORIGIN" )
-  message(FATAL_ERROR "\"COVERAGE_AND_ORIGIN\" setting for LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING currently unimplemented.")
 elseif( uppercase_LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING STREQUAL "DISABLED" OR NOT DEFINED LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING )
   # The DISABLED setting is default and requires no additional defines.
 else()
diff --git a/llvm/docs/CMake.rst b/llvm/docs/CMake.rst
index 9cdde342c8a7b0..dfda12dbe84a4f 100644
--- a/llvm/docs/CMake.rst
+++ b/llvm/docs/CMake.rst
@@ -483,14 +483,11 @@ enabled sub-projects. Nearly all of these variable names begin with
 **LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING**:STRING
   Enhances Debugify's ability to detect line number errors by storing extra
   information inside Instructions, removing false positives from Debugify's
-  results at the cost of performance. Allowed values are `DISABLED` (default),
-  `COVERAGE`, and `COVERAGE_AND_ORIGIN`. `COVERAGE` tracks whether and why a
-  line number was intentionally dropped or not generated for an instruction,
-  allowing Debugify to avoid reporting these as errors; this comes with a small
-  performance cost of ~0.1%. `COVERAGE_AND_ORIGIN` additionally stores a stack
-  trace of the point where each DebugLoc is unintentionally dropped, allowing
-  for much easier bug triaging at the cost of a ~10x performance slowdown.
-  `COVERAGE` and `COVERAGE_AND_ORIGIN` are both ABI-breaking options.
+  results at the cost of performance. Allowed values are `DISABLED` (default)
+  and `COVERAGE`. `COVERAGE` tracks whether and why a line number was
+  intentionally dropped or not generated for an instruction, allowing Debugify
+  to avoid reporting these as errors; this comes with a small performance cost
+  of ~0.1%. `COVERAGE` is an ABI-breaking option.
 
 **LLVM_ENABLE_DIA_SDK**:BOOL
   Enable building with MSVC DIA SDK for PDB debugging support. Available



More information about the llvm-commits mailing list