[clang] [LifetimeSafety] Introduce a liveness-based lifetime policy (PR #159991)

Jan Voung via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 30 18:50:50 PDT 2025


================
@@ -1336,6 +1393,15 @@ class LifetimeChecker {
 //                  LifetimeSafetyAnalysis Class Implementation
 // ========================================================================= //
 
+/// An object to hold the factories for immutable collections, ensuring
+/// that all created states share the same underlying memory management.
----------------
jvoung wrote:

Is it common to share the BumpPtrAllocator?

Was wondering if it would have an effect on the memory locality of the maps/sets. How big of a chunk do the factories allocate at a time, or would you see nodes of each map interspersed with each other (vs nodes of OriginLoan map in one area, and LoanSet in another area)?

Ah, I guess this is just moving the existing code... so NFC.

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


More information about the cfe-commits mailing list