diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-13 05:45:37 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-13 05:45:37 +0800 |
| commit | 236082a0fe4dcd0362c5c74923a93e3db6a01291 (patch) | |
| tree | 5d8a329ca526b087b6ce51895b5135997e8e03bd /backend/unittests/CodeGen/GlobalISel/InstructionSelectTest.cpp | |
| parent | a2f8d7c5e22b510965327383410bd576f7cf28e7 (diff) | |
| download | rcc-project-236082a0fe4dcd0362c5c74923a93e3db6a01291.tar.gz rcc-project-236082a0fe4dcd0362c5c74923a93e3db6a01291.tar.xz | |
[CodeGen] Align pass manager ownership
Diffstat (limited to 'backend/unittests/CodeGen/GlobalISel/InstructionSelectTest.cpp')
| -rw-r--r-- | backend/unittests/CodeGen/GlobalISel/InstructionSelectTest.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/backend/unittests/CodeGen/GlobalISel/InstructionSelectTest.cpp b/backend/unittests/CodeGen/GlobalISel/InstructionSelectTest.cpp index e98f121..30c2b89 100644 --- a/backend/unittests/CodeGen/GlobalISel/InstructionSelectTest.cpp +++ b/backend/unittests/CodeGen/GlobalISel/InstructionSelectTest.cpp @@ -120,7 +120,7 @@ void testPipeline(TestContext &Context) { Fixture.Function->properties() = {rcc::MachineFunctionProperty::IsSSA, rcc::MachineFunctionProperty::TracksLiveness}; const rcc::riscv::RISCVSubtarget Subtarget(rcc::riscv::RISCVSubtargetFeatures::rv64gc()); - rcc::MachinePassManager Pipeline; + rcc::MachineFunctionPassManager Pipeline; Context.expect( Pipeline.addPass(std::make_unique<rcc::Legalizer>(Subtarget.getLegalizerInfo())).has_value(), "legalizer must be accepted by the pass manager"); @@ -131,7 +131,7 @@ void testPipeline(TestContext &Context) { Pipeline.addPass(std::make_unique<rcc::InstructionSelect>(Subtarget.getInstructionSelector())) .has_value(), "instruction selector must be accepted by the pass manager"); - rcc::MachineAnalysisManager Analyses; + rcc::MachineFunctionAnalysisManager Analyses; auto Run = Pipeline.run(*Fixture.Function, *Target, Analyses); Context.expect(Run.has_value(), "RV64GC generic pipeline must complete"); Context.expect(Fixture.Function->properties().has(rcc::MachineFunctionProperty::Selected), @@ -167,7 +167,7 @@ void testInstructionSelectionTransaction(TestContext &Context) { rcc::MachineFunctionProperty::RegBankSelected}; MutatingFailingSelector Selector; rcc::InstructionSelect Pass(Selector); - rcc::MachineAnalysisManager Analyses; + rcc::MachineFunctionAnalysisManager Analyses; auto Run = Pass.run(*Fixture.Function, *Target, Analyses); Context.expect(!Run && Run.error().code() == rcc::ErrorCode::Unsupported, "a renderer failure must be reported before publication"); @@ -203,7 +203,7 @@ void testInstructionSelectionOrder(TestContext &Context) { const rcc::riscv::RISCVSubtarget Subtarget(rcc::riscv::RISCVSubtargetFeatures::rv64gc()); RecordingSelector Selector(*Subtarget.getInstructionSelector()); rcc::InstructionSelect Pass(Selector); - rcc::MachineAnalysisManager Analyses; + rcc::MachineFunctionAnalysisManager Analyses; auto Run = Pass.run(*Fixture.Function, *Target, Analyses); Context.expect(Run.has_value(), "recorded instruction selection must complete"); std::ranges::reverse(LayoutIDs); @@ -233,7 +233,7 @@ void testInstructionSelectionWorklist(TestContext &Context) { rcc::MachineFunctionProperty::RegBankSelected}; TwoStepSelector Selector; rcc::InstructionSelect Pass(Selector); - rcc::MachineAnalysisManager Analyses; + rcc::MachineFunctionAnalysisManager Analyses; auto Run = Pass.run(*Fixture.Function, *Target, Analyses); Context.expect(Run.has_value(), "a progressing multi-step selection must complete"); Context.expect(Selector.selections() == 4, @@ -326,7 +326,7 @@ void testExtendedRV64GCPipeline(TestContext &Context) { Fixture.Function->properties() = {rcc::MachineFunctionProperty::IsSSA, rcc::MachineFunctionProperty::TracksLiveness}; const rcc::riscv::RISCVSubtarget Subtarget(rcc::riscv::RISCVSubtargetFeatures::rv64gc()); - rcc::MachinePassManager Pipeline; + rcc::MachineFunctionPassManager Pipeline; if (!Pipeline.addPass(std::make_unique<rcc::Legalizer>(Subtarget.getLegalizerInfo())) || !Pipeline.addPass(std::make_unique<rcc::RegBankSelect>(Subtarget.getRegBankInfo())) || !Pipeline.addPass( @@ -334,7 +334,7 @@ void testExtendedRV64GCPipeline(TestContext &Context) { Context.expect(false, "extended RV64GC pipeline construction must succeed"); return; } - rcc::MachineAnalysisManager Analyses; + rcc::MachineFunctionAnalysisManager Analyses; auto Run = Pipeline.run(*Fixture.Function, *Target, Analyses); Context.expect(Run.has_value(), "extended RV64GC pipeline must complete"); Context.expect(Run && Fixture.Function->properties().has(rcc::MachineFunctionProperty::Selected), |
