[clang] [compiler-rt] [llvm] [RFC] [msan] make MSan up to 20x faster on AMD CPUs (PR #171993)

Azat Khuzhin via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 14 03:24:03 PST 2025


================
@@ -443,8 +443,8 @@ static const MemoryMapParams Linux_I386_MemoryMapParams = {
 static const MemoryMapParams Linux_X86_64_MemoryMapParams = {
     0,              // AndMask (not used)
     0x500000000000, // XorMask
-    0,              // ShadowBase (not used)
-    0x100000000000, // OriginBase
+    0x200000,       // ShadowBase (== kShadowOffset)
----------------
azat wrote:

Also AFAICS it is free (or almost free), since the real asm looks like (with `-O3`)

```asm
movq   $0x0, 0x200000(%rax)
```

Instead of 

```asm
movq   $0x0, (%rax)
```

And I've also tested the performance on Intel, it looks the same - https://pastila.nl/?00b2e9d6/e11d914e0d9309f3444c4b244a9fa469#Ydv8nM20XBa2PJAPq+I6mQ==

https://github.com/llvm/llvm-project/pull/171993


More information about the llvm-commits mailing list