From 79d0de2ac37b6b7d66720611935d1dd7fc4fbd43 Mon Sep 17 00:00:00 2001 From: paperchalice Date: Tue, 9 Jul 2024 09:11:18 +0800 Subject: [CodeGen][NewPM] Port `machine-loops` to new pass manager (#97793) - Add `MachineLoopAnalysis`. - Add `MachineLoopPrinterPass`. - Convert to `MachineLoopInfoWrapperPass` in legacy pass manager. --- llvm/lib/CodeGen/BranchFolding.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/BranchFolding.cpp') diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp index 1b6a6ee..afe7970 100644 --- a/llvm/lib/CodeGen/BranchFolding.cpp +++ b/llvm/lib/CodeGen/BranchFolding.cpp @@ -415,7 +415,7 @@ MachineBasicBlock *BranchFolder::SplitMBBAt(MachineBasicBlock &CurMBB, // NewMBB belongs to the same loop as CurMBB. if (MLI) if (MachineLoop *ML = MLI->getLoopFor(&CurMBB)) - ML->addBasicBlockToLoop(NewMBB, MLI->getBase()); + ML->addBasicBlockToLoop(NewMBB, *MLI); // NewMBB inherits CurMBB's block frequency. MBBFreqInfo.setBlockFreq(NewMBB, MBBFreqInfo.getBlockFreq(&CurMBB)); -- cgit v1.1