[llvm] [NFC][KeyInstr] Add (LLVM_)EXPERIMENTAL_KEY_INSTRUCTIONS (cmake/)definition (PR #131344)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 14 08:16:22 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-debuginfo
Author: Orlando Cazalet-Hyams (OCHyams)
<details>
<summary>Changes</summary>
Key Instructions will start development behind a compile time flag to avoid
passing on the increased memory usage to all debug builds. We're working on
improving DILocation memory characteristics simultaneously; once that work lands
we can remove `EXPERIMENTAL_KEY_INSTRUCTIONS`.
This patch doesn't add any code, it's just so we can get the SIE buildbot
building with the new option right away.
---
Full diff: https://github.com/llvm/llvm-project/pull/131344.diff
2 Files Affected:
- (modified) llvm/CMakeLists.txt (+3)
- (modified) llvm/cmake/modules/HandleLLVMOptions.cmake (+4)
``````````diff
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index c5d3e23a47f0e..18b6ee85fae8d 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -545,6 +545,9 @@ set(LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING "DISABLED" CACHE STRING
"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)
+option(LLVM_EXPERIMENTAL_KEY_INSTRUCTIONS
+ "Add additional fields to DILocations to support Key Instructions" OFF)
+
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 5db06ccdadbeb..c2c04051ef3ce 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -206,6 +206,10 @@ else()
message(FATAL_ERROR "Unknown value for LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING: \"${LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING}\"!")
endif()
+if(LLVM_EXPERIMENTAL_KEY_INSTRUCTIONS)
+ add_compile_definitions(EXPERIMENTAL_KEY_INSTRUCTIONS)
+endif()
+
if( LLVM_REVERSE_ITERATION )
set( LLVM_ENABLE_REVERSE_ITERATION 1 )
endif()
``````````
</details>
https://github.com/llvm/llvm-project/pull/131344
More information about the llvm-commits
mailing list