[all-commits] [llvm/llvm-project] eeffaf: [AllocToken] Refactor stateless token calculation ...

Marco Elver via All-commits all-commits at lists.llvm.org
Wed Oct 22 01:28:17 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: eeffaf110e991791a8ff7e9b7bb40b5317c70bad
      https://github.com/llvm/llvm-project/commit/eeffaf110e991791a8ff7e9b7bb40b5317c70bad
  Author: Marco Elver <elver at google.com>
  Date:   2025-10-22 (Wed, 22 Oct 2025)

  Changed paths:
    A llvm/include/llvm/Support/AllocToken.h
    A llvm/lib/Support/AllocToken.cpp
    M llvm/lib/Support/CMakeLists.txt
    M llvm/lib/Transforms/Instrumentation/AllocToken.cpp
    M llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn

  Log Message:
  -----------
  [AllocToken] Refactor stateless token calculation into Support (#163633)

Refactor the stateless (hash-based) token calculation logic out of the
`AllocToken` pass and into `llvm/Support/AllocToken.h`.

This helps with making the token calculation logic available to other
parts of the codebase, which will be necessary for frontend
implementation of `__builtin_infer_alloc_token` to perform constexpr
evaluation.

The `AllocTokenMode` enum and a new `AllocTokenMetadata` struct are
moved into a shared header. The `getAllocTokenHash()` function now
provides the source of truth for calculating token IDs for `TypeHash`
and `TypeHashPointerSplit` modes.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list