aboutsummaryrefslogtreecommitdiff
path: root/backend/include/rcc/CodeGen/MachineOperand.h
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-19 04:27:41 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-19 04:27:41 +0800
commit307fc0961972ac5264d6f3459978fbec95cad3a9 (patch)
tree80eff53db8f62a736a46221d258dcadf7543fa88 /backend/include/rcc/CodeGen/MachineOperand.h
parent6a91664223881226e2b6186561c05ff378a19355 (diff)
downloadrcc-project-307fc0961972ac5264d6f3459978fbec95cad3a9.tar.gz
rcc-project-307fc0961972ac5264d6f3459978fbec95cad3a9.tar.xz
[RISCV][GlobalISel] Select and expand global addresses
Diffstat (limited to 'backend/include/rcc/CodeGen/MachineOperand.h')
-rw-r--r--backend/include/rcc/CodeGen/MachineOperand.h5
1 files changed, 4 insertions, 1 deletions
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<MachineOperand>
- 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<MachineOperand>
externalSymbol(std::string Name, std::int64_t Offset = 0, std::uint32_t TargetFlags = 0);
[[nodiscard]] static Expected<MachineOperand> blockAddress(std::string FunctionName,