diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-02 03:37:46 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-02 03:37:46 +0800 |
| commit | a8a9d7d926202450645deae872d4d9dc11d63215 (patch) | |
| tree | 16a3640a93e3f567ff31045969c02a42e1f467e0 /backend/include/rcc/CodeGen/MachineOperand.h | |
| parent | 49d70380a6a95e4039f6b5e5ccce09671d5b4796 (diff) | |
| download | rcc-project-a8a9d7d926202450645deae872d4d9dc11d63215.tar.gz rcc-project-a8a9d7d926202450645deae872d4d9dc11d63215.tar.xz | |
[CodeGen] Model machine debug metadata
Replace marker-based metadata operands with scoped references and inline DIExpression values. Add structured DILocation chains, instruction debug attachments, stack variable records, and entry values with unified verification, builder support, and deterministic cloning.
Diffstat (limited to 'backend/include/rcc/CodeGen/MachineOperand.h')
| -rw-r--r-- | backend/include/rcc/CodeGen/MachineOperand.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/backend/include/rcc/CodeGen/MachineOperand.h b/backend/include/rcc/CodeGen/MachineOperand.h index 35cf45b..ce5eb60 100644 --- a/backend/include/rcc/CodeGen/MachineOperand.h +++ b/backend/include/rcc/CodeGen/MachineOperand.h @@ -4,6 +4,7 @@ #define RCC_CODEGEN_MACHINEOPERAND_H #include "rcc/CodeGen/LowLevelType.h" +#include "rcc/CodeGen/MachineDebugInfo.h" #include "rcc/CodeGen/MachineIRTypes.h" #include "rcc/CodeGen/Register.h" #include "rcc/CodeGen/RegisterMask.h" @@ -176,7 +177,7 @@ struct RegisterMaskOperand final { }; struct MetadataOperand final { - std::string Marker; + MachineMetadataValue Value; friend bool operator==(const MetadataOperand &Left, const MetadataOperand &Right) = default; }; @@ -247,7 +248,7 @@ public: std::uint32_t TargetFlags = 0); [[nodiscard]] static Expected<MachineOperand> registerMask(std::shared_ptr<const RegisterMask> Mask, std::uint32_t TargetFlags = 0); - [[nodiscard]] static Expected<MachineOperand> metadata(std::string Marker, + [[nodiscard]] static Expected<MachineOperand> metadata(MachineMetadataValue Value, std::uint32_t TargetFlags = 0); [[nodiscard]] static MachineOperand targetIndex(TargetIndex Index, std::int64_t Offset = 0, std::uint32_t TargetFlags = 0); |
