[llvm] [CAS] Add LLVMCAS library with InMemoryCAS implementation (PR #114096)

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 7 15:24:04 PDT 2025


================
@@ -0,0 +1,121 @@
+# Content Addressable Storage
+
+## Introduction to CAS
+
+Content Addressable Storage, or `CAS`, is a storage system where it assigns
+unique addresses to the data stored. It is very useful for data deduplicaton
+and creating unique identifiers.
+
+Unlike other kinds of storage system like a file system, CAS is immutable. It
+is more reliable to model a computation by representing the inputs and outputs
+of the computation using objects stored in CAS.
+
+The basic unit of the CAS library is a CASObject, where it contains:
+
+* Data: arbitrary data
+* References: references to other CASObject
+
+It can be conceptually modeled as something like:
+
+```
+struct CASObject {
+  ArrayRef<char> Data;
+  ArrayRef<CASObject*> Refs;
+}
+```
+
+With this abstraction, it is possible to compose CASObjects into a DAG that is
----------------
adrian-prantl wrote:

seems inconsistent that CASObject is not quoted in backticks?

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


More information about the llvm-commits mailing list