aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
diff options
context:
space:
mode:
authorpaperchalice <liujunchang97@outlook.com>2024-07-09 09:11:18 +0800
committerGitHub <noreply@github.com>2024-07-09 09:11:18 +0800
commit79d0de2ac37b6b7d66720611935d1dd7fc4fbd43 (patch)
tree27fc88539708d84f03ca11a890551780e33a5f2c /llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
parentafa6bed8afe9011c07c682a0a24362260d92cfdd (diff)
downloadllvm-79d0de2ac37b6b7d66720611935d1dd7fc4fbd43.zip
llvm-79d0de2ac37b6b7d66720611935d1dd7fc4fbd43.tar.gz
llvm-79d0de2ac37b6b7d66720611935d1dd7fc4fbd43.tar.bz2
[CodeGen][NewPM] Port `machine-loops` to new pass manager (#97793)
- Add `MachineLoopAnalysis`. - Add `MachineLoopPrinterPass`. - Convert to `MachineLoopInfoWrapperPass` in legacy pass manager.
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
index 77e82a3..70b91c2 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
@@ -49,7 +49,7 @@ class WebAssemblyCFGStackify final : public MachineFunctionPass {
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequired<MachineDominatorTreeWrapperPass>();
- AU.addRequired<MachineLoopInfo>();
+ AU.addRequired<MachineLoopInfoWrapperPass>();
AU.addRequired<WebAssemblyExceptionInfo>();
MachineFunctionPass::getAnalysisUsage(AU);
}
@@ -397,7 +397,7 @@ void WebAssemblyCFGStackify::placeBlockMarker(MachineBasicBlock &MBB) {
/// Insert a LOOP marker for a loop starting at MBB (if it's a loop header).
void WebAssemblyCFGStackify::placeLoopMarker(MachineBasicBlock &MBB) {
MachineFunction &MF = *MBB.getParent();
- const auto &MLI = getAnalysis<MachineLoopInfo>();
+ const auto &MLI = getAnalysis<MachineLoopInfoWrapperPass>().getLI();
const auto &WEI = getAnalysis<WebAssemblyExceptionInfo>();
SortRegionInfo SRI(MLI, WEI);
const auto &TII = *MF.getSubtarget<WebAssemblySubtarget>().getInstrInfo();
@@ -467,7 +467,7 @@ void WebAssemblyCFGStackify::placeTryMarker(MachineBasicBlock &MBB) {
MachineFunction &MF = *MBB.getParent();
auto &MDT = getAnalysis<MachineDominatorTreeWrapperPass>().getDomTree();
const auto &TII = *MF.getSubtarget<WebAssemblySubtarget>().getInstrInfo();
- const auto &MLI = getAnalysis<MachineLoopInfo>();
+ const auto &MLI = getAnalysis<MachineLoopInfoWrapperPass>().getLI();
const auto &WEI = getAnalysis<WebAssemblyExceptionInfo>();
SortRegionInfo SRI(MLI, WEI);
const auto &MFI = *MF.getInfo<WebAssemblyFunctionInfo>();