diff options
author | paperchalice <liujunchang97@outlook.com> | 2024-07-10 19:34:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-10 19:34:48 +0800 |
commit | abde52aa667118d18e9551ab87a15b95c267b3b6 (patch) | |
tree | 1bcef533428ab18c5add00ba7ed5c0d4e82d2e95 /llvm/lib/CodeGen/ModuloSchedule.cpp | |
parent | 3e06392c7db0eacfca94a176d430d9988b3ffbd6 (diff) | |
download | llvm-abde52aa667118d18e9551ab87a15b95c267b3b6.zip llvm-abde52aa667118d18e9551ab87a15b95c267b3b6.tar.gz llvm-abde52aa667118d18e9551ab87a15b95c267b3b6.tar.bz2 |
[CodeGen][NewPM] Port `LiveIntervals` to new pass manager (#98118)
- Add `LiveIntervalsAnalysis`.
- Add `LiveIntervalsPrinterPass`.
- Use `LiveIntervalsWrapperPass` in legacy pass manager.
- Use `std::unique_ptr` instead of raw pointer for `LICalc`, so
destructor and default move constructor can handle it correctly.
This would be the last analysis required by `PHIElimination`.
Diffstat (limited to 'llvm/lib/CodeGen/ModuloSchedule.cpp')
-rw-r--r-- | llvm/lib/CodeGen/ModuloSchedule.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/ModuloSchedule.cpp b/llvm/lib/CodeGen/ModuloSchedule.cpp index 8b4a6fe..0f29ebe 100644 --- a/llvm/lib/CodeGen/ModuloSchedule.cpp +++ b/llvm/lib/CodeGen/ModuloSchedule.cpp @@ -2764,7 +2764,7 @@ public: void getAnalysisUsage(AnalysisUsage &AU) const override { AU.addRequired<MachineLoopInfoWrapperPass>(); - AU.addRequired<LiveIntervals>(); + AU.addRequired<LiveIntervalsWrapperPass>(); MachineFunctionPass::getAnalysisUsage(AU); } }; @@ -2775,7 +2775,7 @@ char ModuloScheduleTest::ID = 0; INITIALIZE_PASS_BEGIN(ModuloScheduleTest, "modulo-schedule-test", "Modulo Schedule test pass", false, false) INITIALIZE_PASS_DEPENDENCY(MachineLoopInfoWrapperPass) -INITIALIZE_PASS_DEPENDENCY(LiveIntervals) +INITIALIZE_PASS_DEPENDENCY(LiveIntervalsWrapperPass) INITIALIZE_PASS_END(ModuloScheduleTest, "modulo-schedule-test", "Modulo Schedule test pass", false, false) @@ -2810,7 +2810,7 @@ static void parseSymbolString(StringRef S, int &Cycle, int &Stage) { } void ModuloScheduleTest::runOnLoop(MachineFunction &MF, MachineLoop &L) { - LiveIntervals &LIS = getAnalysis<LiveIntervals>(); + LiveIntervals &LIS = getAnalysis<LiveIntervalsWrapperPass>().getLIS(); MachineBasicBlock *BB = L.getTopBlock(); dbgs() << "--- ModuloScheduleTest running on BB#" << BB->getNumber() << "\n"; |