aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/CodeGen/MIRParser
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-25 02:38:56 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-25 02:38:56 +0800
commitc3932f55208e3fe2019d26a0e5af421c0b644872 (patch)
treeba4fee68834007bd8cd1ce0f209d8c1deb5dd530 /backend/lib/CodeGen/MIRParser
parent71988f9818677df0d90b19d4bb770ac8a6116e62 (diff)
downloadrcc-project-c3932f55208e3fe2019d26a0e5af421c0b644872.tar.gz
rcc-project-c3932f55208e3fe2019d26a0e5af421c0b644872.tar.xz
[RISCV] Implement make-compressible pass
Diffstat (limited to 'backend/lib/CodeGen/MIRParser')
-rw-r--r--backend/lib/CodeGen/MIRParser/MIRParser.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/backend/lib/CodeGen/MIRParser/MIRParser.cpp b/backend/lib/CodeGen/MIRParser/MIRParser.cpp
index c7e92a0..944d0c9 100644
--- a/backend/lib/CodeGen/MIRParser/MIRParser.cpp
+++ b/backend/lib/CodeGen/MIRParser/MIRParser.cpp
@@ -276,6 +276,8 @@ bool MIRDocumentParser::parseFunction(const yaml::Node &Root, MIRDocument &Docum
return importError(NameNode->range(), Created.error());
MachineFunction &Function = **Created;
ActiveFunction = &Function;
+ if (IRFunction != nullptr && IRFunction->hasMinSize())
+ Function.attributes().set(MachineFunctionAttribute::MinSize);
MIRFunctionDocumentInfo DocumentInfo{
.Function = Function.stableID(),