diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-25 02:38:56 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-25 02:38:56 +0800 |
| commit | c3932f55208e3fe2019d26a0e5af421c0b644872 (patch) | |
| tree | ba4fee68834007bd8cd1ce0f209d8c1deb5dd530 /backend/include | |
| parent | 71988f9818677df0d90b19d4bb770ac8a6116e62 (diff) | |
| download | rcc-project-c3932f55208e3fe2019d26a0e5af421c0b644872.tar.gz rcc-project-c3932f55208e3fe2019d26a0e5af421c0b644872.tar.xz | |
[RISCV] Implement make-compressible pass
Diffstat (limited to 'backend/include')
| -rw-r--r-- | backend/include/rcc/CodeGen/MachineFunctionAttributes.h | 1 | ||||
| -rw-r--r-- | backend/include/rcc/MIR/EmbeddedIR.h | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/backend/include/rcc/CodeGen/MachineFunctionAttributes.h b/backend/include/rcc/CodeGen/MachineFunctionAttributes.h index 4344640..fd1d8d8 100644 --- a/backend/include/rcc/CodeGen/MachineFunctionAttributes.h +++ b/backend/include/rcc/CodeGen/MachineFunctionAttributes.h @@ -24,6 +24,7 @@ enum class MachineFunctionAttribute : std::uint8_t { IsOutlined, DebugInstrRef, TracksDebugUserValues, + MinSize, Count, }; diff --git a/backend/include/rcc/MIR/EmbeddedIR.h b/backend/include/rcc/MIR/EmbeddedIR.h index 80e512a..17b19cb 100644 --- a/backend/include/rcc/MIR/EmbeddedIR.h +++ b/backend/include/rcc/MIR/EmbeddedIR.h @@ -74,6 +74,10 @@ public: return HasSectionPrefix; } + [[nodiscard]] bool hasMinSize() const noexcept { + return HasMinSize; + } + [[nodiscard]] std::span<const EmbeddedIRReference> blocks() const noexcept { return Blocks; } @@ -107,6 +111,8 @@ private: bool HasSection = false; bool HasComdat = false; bool HasSectionPrefix = false; + bool HasMinSize = false; + std::optional<std::string> AttributeGroup; std::uint64_t NextUnnamedSlot = 0; std::vector<EmbeddedIRReference> Blocks; std::vector<EmbeddedIRReference> Allocas; |
