diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-01 17:36:40 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-01 17:36:40 +0800 |
| commit | 787f3a7a20958bfa6f231abccc617f4d8de25c4d (patch) | |
| tree | 775d2913f48fc5f3a6e44bc6da986da9e52754ef /backend/include/rcc/CodeGen/MachineBasicBlock.h | |
| parent | 77d76b73a614820bf45024b053db376f35b06d10 (diff) | |
| download | rcc-project-787f3a7a20958bfa6f231abccc617f4d8de25c4d.tar.gz rcc-project-787f3a7a20958bfa6f231abccc617f4d8de25c4d.tar.xz | |
[CodeGen] Add MIR function and block attributes
Diffstat (limited to 'backend/include/rcc/CodeGen/MachineBasicBlock.h')
| -rw-r--r-- | backend/include/rcc/CodeGen/MachineBasicBlock.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/backend/include/rcc/CodeGen/MachineBasicBlock.h b/backend/include/rcc/CodeGen/MachineBasicBlock.h index ba59160..d82477a 100644 --- a/backend/include/rcc/CodeGen/MachineBasicBlock.h +++ b/backend/include/rcc/CodeGen/MachineBasicBlock.h @@ -3,6 +3,7 @@ #ifndef RCC_CODEGEN_MACHINEBASICBLOCK_H #define RCC_CODEGEN_MACHINEBASICBLOCK_H +#include "rcc/CodeGen/MachineBasicBlockAttributes.h" #include "rcc/CodeGen/MachineIRTypes.h" #include "rcc/CodeGen/Register.h" #include "rcc/CodeGen/StableID.h" @@ -124,6 +125,14 @@ public: return LayoutIndex; } + [[nodiscard]] MachineBasicBlockAttributes &attributes() noexcept { + return Attributes; + } + + [[nodiscard]] const MachineBasicBlockAttributes &attributes() const noexcept { + return Attributes; + } + private: MachineBasicBlock(MachineFunction &OwnerFunction, MachineBlockStableID StableID) : OwnerFunction(&OwnerFunction), StableID(StableID) {} @@ -138,6 +147,7 @@ private: std::vector<MachineBasicBlock *> Predecessors; std::vector<MachineSuccessor> Successors; std::vector<MachineBasicBlockLiveIn> LiveIns; + MachineBasicBlockAttributes Attributes; std::optional<std::uint32_t> DenseNumber; std::optional<std::uint32_t> LayoutIndex; |
