diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-01 17:58:12 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-01 17:58:12 +0800 |
| commit | 6e09614afd2a589690d107b41308f6fe6614c266 (patch) | |
| tree | e7f6bdcbe23eae1d53d610be2683e06a4831997c /backend/include/rcc/CodeGen/MachineFunction.h | |
| parent | 787f3a7a20958bfa6f231abccc617f4d8de25c4d (diff) | |
| download | rcc-project-6e09614afd2a589690d107b41308f6fe6614c266.tar.gz rcc-project-6e09614afd2a589690d107b41308f6fe6614c266.tar.xz | |
[CodeGen] Add machine function records
Represent callee-saved registers, call-site information, called globals, and prefetch targets in the core MachineIR model. Verify target and instruction references and remap StableIDs during explicit function cloning.
Diffstat (limited to 'backend/include/rcc/CodeGen/MachineFunction.h')
| -rw-r--r-- | backend/include/rcc/CodeGen/MachineFunction.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/backend/include/rcc/CodeGen/MachineFunction.h b/backend/include/rcc/CodeGen/MachineFunction.h index 4ed660d..c067ee1 100644 --- a/backend/include/rcc/CodeGen/MachineFunction.h +++ b/backend/include/rcc/CodeGen/MachineFunction.h @@ -8,6 +8,7 @@ #include "rcc/CodeGen/MachineFrameInfo.h" #include "rcc/CodeGen/MachineFunctionAttributes.h" #include "rcc/CodeGen/MachineFunctionProperties.h" +#include "rcc/CodeGen/MachineFunctionRecords.h" #include "rcc/CodeGen/MachineJumpTableInfo.h" #include "rcc/CodeGen/MachineRegisterInfo.h" #include "rcc/CodeGen/StableID.h" @@ -98,6 +99,14 @@ public: return Attributes; } + [[nodiscard]] MachineFunctionRecords &records() noexcept { + return Records; + } + + [[nodiscard]] const MachineFunctionRecords &records() const noexcept { + return Records; + } + [[nodiscard]] const TargetFunctionState &targetState() const noexcept { return TargetState; } @@ -176,6 +185,7 @@ private: MachineJumpTableInfo JumpTables; MachineFunctionProperties Properties; MachineFunctionAttributes Attributes; + MachineFunctionRecords Records; TargetFunctionState TargetState; MachineCompilationStatus CompilationStatus; MachineBasicBlock *FirstBlock = nullptr; |
