[clang] [X86] Enhance kCFI type IDs with a 3-bit arity indicator. (PR #117121)
Phoebe Wang via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 21 23:28:53 PST 2024
phoebewang wrote:
> Second, this scheme reduces the expected number of hash collisions within each arity, compared against the expected number of collisions (0.01383765) for the 32-bit hashing scheme that includes all arities. The table below shows the expected number of collisions for each arity, given the number of unique indirect callable function types within that arity in the same Ubuntu 24.04 server kernel discussed above.
The collisions vary a lot with different number of function types. It looks to me more smooth if we use 2 bits to distinguish 4 cases: 1, 2, 3 and 0 or others.
https://github.com/llvm/llvm-project/pull/117121
More information about the cfe-commits
mailing list