aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
diff options
context:
space:
mode:
authorpaperchalice <liujunchang97@outlook.com>2024-07-10 19:34:48 +0800
committerGitHub <noreply@github.com>2024-07-10 19:34:48 +0800
commitabde52aa667118d18e9551ab87a15b95c267b3b6 (patch)
tree1bcef533428ab18c5add00ba7ed5c0d4e82d2e95 /llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
parent3e06392c7db0eacfca94a176d430d9988b3ffbd6 (diff)
downloadllvm-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/Target/WebAssembly/WebAssemblyRegStackify.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
index a53b4d4..17e166c 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
@@ -50,10 +50,10 @@ class WebAssemblyRegStackify final : public MachineFunctionPass {
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesCFG();
AU.addRequired<MachineDominatorTreeWrapperPass>();
- AU.addRequired<LiveIntervals>();
+ AU.addRequired<LiveIntervalsWrapperPass>();
AU.addPreserved<MachineBlockFrequencyInfo>();
AU.addPreserved<SlotIndexesWrapperPass>();
- AU.addPreserved<LiveIntervals>();
+ AU.addPreserved<LiveIntervalsWrapperPass>();
AU.addPreservedID(LiveVariablesID);
AU.addPreserved<MachineDominatorTreeWrapperPass>();
MachineFunctionPass::getAnalysisUsage(AU);
@@ -815,7 +815,7 @@ bool WebAssemblyRegStackify::runOnMachineFunction(MachineFunction &MF) {
const auto *TII = MF.getSubtarget<WebAssemblySubtarget>().getInstrInfo();
const auto *TRI = MF.getSubtarget<WebAssemblySubtarget>().getRegisterInfo();
auto &MDT = getAnalysis<MachineDominatorTreeWrapperPass>().getDomTree();
- auto &LIS = getAnalysis<LiveIntervals>();
+ auto &LIS = getAnalysis<LiveIntervalsWrapperPass>().getLIS();
// Walk the instructions from the bottom up. Currently we don't look past
// block boundaries, and the blocks aren't ordered so the block visitation