[all-commits] [llvm/llvm-project] 0fc5d0: [IR] Introduce `mem.cache_hint` metadata for compo...

Fei Peng via All-commits all-commits at lists.llvm.org
Fri May 29 11:58:20 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0fc5d0ab0cea3afe32592f24af17b5d7e02c9dfe
      https://github.com/llvm/llvm-project/commit/0fc5d0ab0cea3afe32592f24af17b5d7e02c9dfe
  Author: Fei Peng <feip at nvidia.com>
  Date:   2026-05-29 (Fri, 29 May 2026)

  Changed paths:
    M llvm/docs/LangRef.rst
    M llvm/include/llvm/IR/FixedMetadataKinds.def
    M llvm/lib/IR/Instruction.cpp
    M llvm/lib/IR/Verifier.cpp
    M llvm/lib/Transforms/Utils/Local.cpp
    M llvm/test/Bitcode/compatibility.ll
    M llvm/test/Transforms/GVN/metadata.ll
    M llvm/test/Transforms/InstCombine/loadstore-metadata.ll
    M llvm/test/Transforms/SimplifyCFG/hoist-with-metadata.ll
    A llvm/test/Verifier/mem-cache-hint.ll

  Log Message:
  -----------
  [IR] Introduce `mem.cache_hint` metadata for composable memory cache control hints (#181612)

Add target-agnostic infrastructure for the !mem.cache_hint metadata
kind,
https://discourse.llvm.org/t/rfc-composable-and-extensible-memory-cache-control-hints-in-llvm-ir/89443

This patch includes:
- Registration of mem.cache_hint in FixedMetadataKinds
- IR Verifier validation of structural constraints
- Metadata helper support in combineMetadata(), copyMetadataForLoad(),
and dropUBImplyingAttrsAndMetadata()
- LangRef documentation for the metadata format and semantics
- Verifier and transform pass test coverage (GVN, InstCombine,
SimplifyCFG)

Co-authored-by: Yonah Goldberg <ygoldberg at nvidia.com>
Assisted-by: Claude Code

---------

Co-authored-by: Yonah Goldberg <ygoldberg at nvidia.com>



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