[compiler-rt] [llvm] [msan] ability to make MSan up to 20x faster on AMD CPUs (-DLLVM_MSAN_SHADOW_OFFSET_2MB=1) (PR #171993)
Thurston Dang via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 22 10:21:03 PST 2025
================
@@ -350,6 +350,12 @@ if(NOT COMPILER_RT_HAS_FUNC_SYMBOL)
add_definitions(-D__func__=__FUNCTION__)
endif()
+if (LLVM_MSAN_SHADOW_OFFSET_2MB)
----------------
thurstond wrote:
Two alternatives to consider for the definition:
- name it something like MSan Zen workaround, to make it obvious what the purpose is
- make the MSan shadow offset a parameter (e.g., -DLLVM_MSAN_SHADOW_OFFSET=2048576), so that if some other platform ends up needing a different offset, it won't be necessary to make a new flag
https://github.com/llvm/llvm-project/pull/171993
More information about the llvm-commits
mailing list