diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-12 21:35:21 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-12 21:35:21 +0800 |
| commit | f8daf08aba1f09c3024a70d3426891112d1662a2 (patch) | |
| tree | daf3a5e309e41c3bef92efdb496806061d2a2c02 /backend/lib/Target/RISCV/RISCVPipeline.cpp | |
| parent | 8721893d3ba605f5374d9c0c7987af6110355638 (diff) | |
| download | rcc-project-f8daf08aba1f09c3024a70d3426891112d1662a2.tar.gz rcc-project-f8daf08aba1f09c3024a70d3426891112d1662a2.tar.xz | |
[RISCV] Consolidate instruction behavior in RISCVInstrInfo
Diffstat (limited to 'backend/lib/Target/RISCV/RISCVPipeline.cpp')
| -rw-r--r-- | backend/lib/Target/RISCV/RISCVPipeline.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/backend/lib/Target/RISCV/RISCVPipeline.cpp b/backend/lib/Target/RISCV/RISCVPipeline.cpp index 3665db5..08a4653 100644 --- a/backend/lib/Target/RISCV/RISCVPipeline.cpp +++ b/backend/lib/Target/RISCV/RISCVPipeline.cpp @@ -2,6 +2,7 @@ #include "rcc/Target/RISCV/RISCVPipeline.h" +#include "RISCVInstrInfo.h" #include "rcc/CodeGen/MachineCombiner.h" #include "rcc/CodeGen/MachineFunction.h" #include "rcc/CodeGen/MachineOptimizationPipeline.h" @@ -45,10 +46,10 @@ template <typename PassT, typename... ArgumentT> auto Added = addSelectedSSAOptimizationPipeline(Pipeline, optimizationPipelineInfo()); if (!Added) return std::unexpected(Added.error()); - Added = addPass<PHIEliminationPass>(Pipeline, ssaInfo()); + Added = addPass<PHIEliminationPass>(Pipeline, instrInfo()); if (!Added) return std::unexpected(Added.error()); - return addPass<TwoAddressRewritePass>(Pipeline, ssaInfo()); + return addPass<TwoAddressRewritePass>(Pipeline, instrInfo()); } [[nodiscard]] Expected<void> addRegisterAllocationPipeline(MachinePassManager &Pipeline) { @@ -104,13 +105,13 @@ Expected<void> addCanonicalPipeline(MachinePassManager &Pipeline, const MachineF if (!Added) return std::unexpected(Added.error()); if (!Function.properties().has(MachineFunctionProperty::NoPHIs)) { - Added = addPass<PHIEliminationPass>(Pipeline, ssaInfo()); + Added = addPass<PHIEliminationPass>(Pipeline, instrInfo()); if (!Added) return std::unexpected(Added.error()); } } if (!Function.properties().has(MachineFunctionProperty::TiedOpsRewritten)) { - auto Added = addPass<TwoAddressRewritePass>(Pipeline, ssaInfo()); + auto Added = addPass<TwoAddressRewritePass>(Pipeline, instrInfo()); if (!Added) return std::unexpected(Added.error()); } |
