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/MachineVerifier.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/MachineVerifier.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineVerifier.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp index 395f5de..d0d3af0 100644 --- a/llvm/lib/CodeGen/MachineVerifier.cpp +++ b/llvm/lib/CodeGen/MachineVerifier.cpp @@ -316,7 +316,7 @@ namespace { AU.addUsedIfAvailable<LiveStacks>(); AU.addUsedIfAvailable<LiveVariablesWrapperPass>(); AU.addUsedIfAvailable<SlotIndexesWrapperPass>(); - AU.addUsedIfAvailable<LiveIntervals>(); + AU.addUsedIfAvailable<LiveIntervalsWrapperPass>(); AU.setPreservesAll(); MachineFunctionPass::getAnalysisUsage(AU); } @@ -428,7 +428,8 @@ unsigned MachineVerifier::verify(const MachineFunction &MF) { MachineFunctionProperties::Property::TracksDebugUserValues); if (PASS) { - LiveInts = PASS->getAnalysisIfAvailable<LiveIntervals>(); + auto *LISWrapper = PASS->getAnalysisIfAvailable<LiveIntervalsWrapperPass>(); + LiveInts = LISWrapper ? &LISWrapper->getLIS() : nullptr; // We don't want to verify LiveVariables if LiveIntervals is available. auto *LVWrapper = PASS->getAnalysisIfAvailable<LiveVariablesWrapperPass>(); if (!LiveInts) |