aboutsummaryrefslogtreecommitdiff
path: root/backend/include/rcc/CodeGen/MachineFunction.h
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-01 17:58:12 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-01 17:58:12 +0800
commit6e09614afd2a589690d107b41308f6fe6614c266 (patch)
treee7f6bdcbe23eae1d53d610be2683e06a4831997c /backend/include/rcc/CodeGen/MachineFunction.h
parent787f3a7a20958bfa6f231abccc617f4d8de25c4d (diff)
downloadrcc-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.h10
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;