[all-commits] [llvm/llvm-project] dda996: [CAS] Add LLVMCAS library with InMemoryCAS impleme...

Steven Wu via All-commits all-commits at lists.llvm.org
Tue Aug 12 10:26:05 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dda996b875bca44bc1c4bf19c0a841a958cb7b4b
      https://github.com/llvm/llvm-project/commit/dda996b875bca44bc1c4bf19c0a841a958cb7b4b
  Author: Steven Wu <stevenwu at apple.com>
  Date:   2025-08-12 (Tue, 12 Aug 2025)

  Changed paths:
    A llvm/docs/ContentAddressableStorage.md
    M llvm/docs/Reference.rst
    A llvm/include/llvm/CAS/BuiltinCASContext.h
    A llvm/include/llvm/CAS/BuiltinObjectHasher.h
    A llvm/include/llvm/CAS/CASID.h
    A llvm/include/llvm/CAS/CASReference.h
    A llvm/include/llvm/CAS/ObjectStore.h
    M llvm/include/module.modulemap
    A llvm/lib/CAS/BuiltinCAS.cpp
    A llvm/lib/CAS/BuiltinCAS.h
    A llvm/lib/CAS/CMakeLists.txt
    A llvm/lib/CAS/InMemoryCAS.cpp
    A llvm/lib/CAS/ObjectStore.cpp
    M llvm/lib/CMakeLists.txt
    A llvm/unittests/CAS/CASTestConfig.cpp
    A llvm/unittests/CAS/CASTestConfig.h
    A llvm/unittests/CAS/CMakeLists.txt
    A llvm/unittests/CAS/ObjectStoreTest.cpp
    M llvm/unittests/CMakeLists.txt

  Log Message:
  -----------
  [CAS] Add LLVMCAS library with InMemoryCAS implementation (#114096)

Add llvm::cas::ObjectStore abstraction and InMemoryCAS as a in-memory
CAS object store implementation.

The ObjectStore models its objects as:
* Content: An array of bytes for the data to be stored.
* Refs: An array of references to other objects in the ObjectStore.
And each CAS Object can be idenfied with an unqine ID/Hash.

ObjectStore supports following general action:
* Expected<ID> store(Content, ArrayRef<Ref>)
* Expected<Ref> get(ID)

It also introduces following types to interact with a CAS ObjectStore:
* CASID: Hash representation for an CAS Objects with its context to help
  print/compare CASIDs.
* ObjectRef: A light-weight ref for an object in the ObjectStore. It is
  implementation defined so it can be optimized for
  read/store/references depending on the implementation.
* ObjectProxy: A proxy for the users of CAS to interact with the data
  inside CAS Object. It bundles a ObjectHandle and an ObjectStore
  instance.



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