aboutsummaryrefslogtreecommitdiff
path: root/backend/include/rcc/CodeGen/MachineFunctionRecords.h
diff options
context:
space:
mode:
Diffstat (limited to 'backend/include/rcc/CodeGen/MachineFunctionRecords.h')
-rw-r--r--backend/include/rcc/CodeGen/MachineFunctionRecords.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/backend/include/rcc/CodeGen/MachineFunctionRecords.h b/backend/include/rcc/CodeGen/MachineFunctionRecords.h
index 7929ed3..b792494 100644
--- a/backend/include/rcc/CodeGen/MachineFunctionRecords.h
+++ b/backend/include/rcc/CodeGen/MachineFunctionRecords.h
@@ -4,6 +4,7 @@
#define RCC_CODEGEN_MACHINEFUNCTIONRECORDS_H
#include "rcc/CodeGen/MachineBasicBlockAttributes.h"
+#include "rcc/CodeGen/MachineDebugInfo.h"
#include "rcc/CodeGen/Register.h"
#include "rcc/CodeGen/StableID.h"
#include "rcc/Support/Error.h"
@@ -37,6 +38,14 @@ struct MachineDebugValueSubstitution final {
MachineDebugValueSubstitution Right) noexcept = default;
};
+struct MachineEntryValueInfo final {
+ PhysicalRegister Reg;
+ MachineVariableDebugInfo DebugInfo;
+
+ friend bool operator==(const MachineEntryValueInfo &Left,
+ const MachineEntryValueInfo &Right) = default;
+};
+
struct MachineCallSiteArgument final {
PhysicalRegister Reg;
std::uint16_t ArgumentNumber = 0;
@@ -122,6 +131,12 @@ public:
[[nodiscard]] Expected<void>
addDebugValueSubstitution(MachineDebugValueSubstitution Substitution);
+ [[nodiscard]] std::span<const MachineEntryValueInfo> entryValues() const noexcept {
+ return EntryValues;
+ }
+
+ [[nodiscard]] Expected<void> addEntryValue(MachineEntryValueInfo EntryValue);
+
[[nodiscard]] Expected<void> verify() const;
[[nodiscard]] Expected<MachineFunctionRecords>
clone(const MachineFunctionCloneContext &CloneContext) const;
@@ -135,6 +150,7 @@ private:
std::vector<MachineCalledGlobal> CalledGlobals;
std::vector<MachinePrefetchTarget> PrefetchTargets;
std::vector<MachineDebugValueSubstitution> DebugValueSubstitutions;
+ std::vector<MachineEntryValueInfo> EntryValues;
};
} // namespace rcc