[clang] [llvm] [LifetimeSafety] Reorganize code into modular components (PR #162474)

Yitzhak Mandelbaum via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 9 14:16:05 PDT 2025


================
@@ -0,0 +1,96 @@
+//===- LiveOrigins.h - Live Origins Analysis -------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the LiveOriginAnalysis, a backward dataflow analysis that
+// determines which origins are "live" at each program point. An origin is
+// "live" at a program point if there's a potential future use of the pointer it
+// represents. Liveness is "generated" by a read of origin's loan set (e.g., a
----------------
ymand wrote:

Nit: I'd replace "represents" with "is associated with".  Also, in the sentence that follows you could describe in terms of the pointer, which I think would be a little clearer (e.g. "read of the pointer" instead of "read of the origin's loan set").

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


More information about the llvm-commits mailing list