[llvm] [BOLT] Add support for Linux kernel static keys jump table (PR #86090)

Amir Ayupov via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 07:28:03 PDT 2024


================
@@ -1343,6 +1383,351 @@ Error LinuxKernelRewriter::readPCIFixupTable() {
   return Error::success();
 }
 
+/// Runtime code modification used by static keys is the most ubiquitous
+/// self-modifying feature of the Linux kernel. The idea is to to eliminate
+/// the condition check and associated conditional jump on a hot path if that
+/// condition (based on a boolean value of a static key) does not change often.
+/// Whenever they condition changes, the kernel runtime modifies all code
----------------
aaupov wrote:

```suggestion
/// Whenever the condition changes, the kernel runtime modifies all code
```

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


More information about the llvm-commits mailing list