diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-12 22:37:49 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-12 22:37:49 +0800 |
| commit | 3341938bb644e6fc39afa6a8fcb1306604999e42 (patch) | |
| tree | a7586c0a8a9d3e7e9dbc8709daf4dd76ca51be5f /backend/tools/MIRTool/MIRToolMain.cpp | |
| parent | 0bb35fa2306a66f1f0baf118619b5c1640ed9c01 (diff) | |
| download | rcc-project-3341938bb644e6fc39afa6a8fcb1306604999e42.tar.gz rcc-project-3341938bb644e6fc39afa6a8fcb1306604999e42.tar.xz | |
[RISCV] Split the GlobalISel target components
Diffstat (limited to 'backend/tools/MIRTool/MIRToolMain.cpp')
| -rw-r--r-- | backend/tools/MIRTool/MIRToolMain.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/backend/tools/MIRTool/MIRToolMain.cpp b/backend/tools/MIRTool/MIRToolMain.cpp index 2c0fe8d..a932a89 100644 --- a/backend/tools/MIRTool/MIRToolMain.cpp +++ b/backend/tools/MIRTool/MIRToolMain.cpp @@ -857,12 +857,17 @@ runWithCache(const CommandLine &Command, CanonicalMIR Input, const rcc::TargetDe return {}; } if (Command.Action == Operation::ListPasses) { + auto Features = + rcc::riscv::RISCVSubtargetFeatures::fromFeatureList(Command.Invocation.Features); + if (!Features) + return std::unexpected(Features.error()); + const rcc::riscv::RISCVSubtarget Subtarget(*Features); std::vector<std::string> Names; for (std::size_t Index = 0; Index < Input->Document.unit().functionCount(); ++Index) { const rcc::MachineFunction *Function = Input->Document.unit().functionAt(Index); if (Function == nullptr) return rcc::makeUnexpected(ErrorCode::InternalError, "MIR input contains a null function"); - auto FunctionNames = rcc::riscv::canonicalPipelinePassNames(*Function); + auto FunctionNames = rcc::riscv::canonicalPipelinePassNames(*Function, Subtarget); if (!FunctionNames) return std::unexpected(FunctionNames.error()); for (std::string &Name : *FunctionNames) { |
