From c9634fa9f529afbdf622a9cd96741bd09d14ef86 Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Sat, 1 Aug 2026 13:55:21 +0800 Subject: [CodeGen] Add MachineFrameInfo Model stable frame indices, stack object kinds, tombstones, lifetimes, and frozen layouts. Validate owned frame references in the builder and verifier, and remap complete frame state during MachineFunction cloning. --- backend/include/rcc/CodeGen/MachineFunction.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'backend/include/rcc/CodeGen/MachineFunction.h') diff --git a/backend/include/rcc/CodeGen/MachineFunction.h b/backend/include/rcc/CodeGen/MachineFunction.h index 487fb5b..3e3fecb 100644 --- a/backend/include/rcc/CodeGen/MachineFunction.h +++ b/backend/include/rcc/CodeGen/MachineFunction.h @@ -3,6 +3,7 @@ #ifndef RCC_CODEGEN_MACHINEFUNCTION_H #define RCC_CODEGEN_MACHINEFUNCTION_H +#include "rcc/CodeGen/MachineFrameInfo.h" #include "rcc/CodeGen/MachineFunctionProperties.h" #include "rcc/CodeGen/MachineRegisterInfo.h" #include "rcc/CodeGen/StableID.h" @@ -52,6 +53,14 @@ public: return RegInfo; } + [[nodiscard]] MachineFrameInfo &frameInfo() noexcept { + return FrameInfo; + } + + [[nodiscard]] const MachineFrameInfo &frameInfo() const noexcept { + return FrameInfo; + } + [[nodiscard]] MachineFunctionProperties &properties() noexcept { return Properties; } @@ -110,6 +119,7 @@ private: std::string Name; MachineFunctionStableID StableID; MachineRegisterInfo RegInfo; + MachineFrameInfo FrameInfo; MachineFunctionProperties Properties; MachineBasicBlock *FirstBlock = nullptr; MachineBasicBlock *LastBlock = nullptr; -- cgit v1.2.3