From 48bcb7db288dc1db0089b7fe94d25c77df47a460 Mon Sep 17 00:00:00 2001 From: Orlando Cazalet-Hyams Date: Fri, 14 Mar 2025 14:45:45 +0000 Subject: [PATCH] [NFC][KeyInstr] Add (LLVM_)EXPERIMENTAL_KEY_INSTRUCTIONS (cmake/)definition 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. --- llvm/CMakeLists.txt | 3 +++ llvm/cmake/modules/HandleLLVMOptions.cmake | 4 ++++ 2 files changed, 7 insertions(+) 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()