[llvm] [RISCV64] liveness analysis (PR #167454)

via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 6 05:31:18 PST 2025


================
@@ -0,0 +1,598 @@
+//===- RISCVLiveVariables.cpp - Live Variable Analysis for RISC-V --------===//
+//
+// 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 implements a live variable analysis pass for the RISC-V backend.
+// The pass computes liveness information for virtual and physical registers
+// in RISC-V machine functions, optimized for RV64 (64-bit RISC-V architecture).
+//
+// The analysis performs a backward dataflow analysis to compute
+// liveness information. Also updates the kill flags on register operands.
----------------
hiraditya wrote:

What is the alternative to kill flag at the moment? Do we keep a separate data structure to maintain the live-ranges. Or maybe if there was an RFC I can follow along from there.

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


More information about the llvm-commits mailing list