diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-24 16:37:25 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-24 16:37:25 +0800 |
| commit | 540c73a2f450af3d0aec6e039fab054471efdbb1 (patch) | |
| tree | 9b260322eaeeac8b8741a30a273f7d407b683e5e /backend/lib/CodeGen/MIRPrinter.cpp | |
| parent | 936ac5647f82def050e6654d44d24a88906f4d7a (diff) | |
| download | rcc-project-540c73a2f450af3d0aec6e039fab054471efdbb1.tar.gz rcc-project-540c73a2f450af3d0aec6e039fab054471efdbb1.tar.xz | |
[RISCV] Match LLVM frame lowering semantics
Diffstat (limited to 'backend/lib/CodeGen/MIRPrinter.cpp')
| -rw-r--r-- | backend/lib/CodeGen/MIRPrinter.cpp | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/backend/lib/CodeGen/MIRPrinter.cpp b/backend/lib/CodeGen/MIRPrinter.cpp index c684368..4683a81 100644 --- a/backend/lib/CodeGen/MIRPrinter.cpp +++ b/backend/lib/CodeGen/MIRPrinter.cpp @@ -959,27 +959,9 @@ Expected<void> MIRDocumentPrinter::printStackObjects(const MachineFunction &Func "stack object contains state not represented by fixed LLVM MIR"); } - std::string_view Type; - switch (Description->Kind) { - case StackObjectKind::Default: - case StackObjectKind::FixedABI: - Type = "default"; - break; - case StackObjectKind::FixedSpillSlot: - case StackObjectKind::SpillSlot: - Type = "spill-slot"; - break; - case StackObjectKind::VariableSized: - Type = "variable-sized"; - break; - case StackObjectKind::DynamicAlloca: - case StackObjectKind::CalleeSaved: - case StackObjectKind::EmergencySpill: - case StackObjectKind::Target: - case StackObjectKind::Count: - return makeUnexpected(ErrorCode::Unsupported, - "stack object kind has no fixed LLVM MIR representation"); - } + const std::string_view Type = Object->isSpill() ? "spill-slot" + : Object->isVariableSized() ? "variable-sized" + : "default"; Output.append(" - { id: "); Output.append(std::to_string(Slot.TextID)); |
