From 307fc0961972ac5264d6f3459978fbec95cad3a9 Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Wed, 19 Aug 2026 04:27:41 +0800 Subject: [RISCV][GlobalISel] Select and expand global addresses --- backend/include/rcc/CodeGen/MachineOperand.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'backend/include/rcc/CodeGen/MachineOperand.h') diff --git a/backend/include/rcc/CodeGen/MachineOperand.h b/backend/include/rcc/CodeGen/MachineOperand.h index 1f321b0..d82e41a 100644 --- a/backend/include/rcc/CodeGen/MachineOperand.h +++ b/backend/include/rcc/CodeGen/MachineOperand.h @@ -5,6 +5,7 @@ #include "rcc/ADT/APFloat.h" #include "rcc/ADT/APInt.h" +#include "rcc/CodeGen/GlobalObject.h" #include "rcc/CodeGen/LowLevelType.h" #include "rcc/CodeGen/MachineDebugInfo.h" #include "rcc/CodeGen/MachineIRTypes.h" @@ -127,6 +128,7 @@ struct JumpTableOperand final { struct GlobalSymbolOperand final { std::string Name; std::int64_t Offset = 0; + GlobalValueProperties Properties; friend bool operator==(const GlobalSymbolOperand &Left, const GlobalSymbolOperand &Right) = default; @@ -329,7 +331,8 @@ public: [[nodiscard]] static MachineOperand jumpTable(JumpTableIndex Index, std::uint32_t TargetFlags = 0); [[nodiscard]] static Expected - globalSymbol(std::string Name, std::int64_t Offset = 0, std::uint32_t TargetFlags = 0); + globalSymbol(std::string Name, std::int64_t Offset = 0, std::uint32_t TargetFlags = 0, + GlobalValueProperties Properties = {}); [[nodiscard]] static Expected externalSymbol(std::string Name, std::int64_t Offset = 0, std::uint32_t TargetFlags = 0); [[nodiscard]] static Expected blockAddress(std::string FunctionName, -- cgit v1.2.3