diff options
author | paperchalice <liujunchang97@outlook.com> | 2024-06-12 14:29:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-12 14:29:22 +0800 |
commit | 4b24c2dfb5c02896ec2e9855ac72eb0771d0764d (patch) | |
tree | ef6fc89bafb9a489aec935ccf56aed981c6c3f70 /llvm/lib/CodeGen/MachineBlockPlacement.cpp | |
parent | c012e487b7246239c31bd378ab074fb110631186 (diff) | |
download | llvm-4b24c2dfb5c02896ec2e9855ac72eb0771d0764d.zip llvm-4b24c2dfb5c02896ec2e9855ac72eb0771d0764d.tar.gz llvm-4b24c2dfb5c02896ec2e9855ac72eb0771d0764d.tar.bz2 |
[CodeGen][NewPM] Split `MachinePostDominators` into a concrete analysis result (#95113)
`MachinePostDominators` version of #94571.
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockPlacement.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBlockPlacement.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp index c0cdeab..d250981 100644 --- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp +++ b/llvm/lib/CodeGen/MachineBlockPlacement.cpp @@ -606,7 +606,7 @@ public: AU.addRequired<MachineBranchProbabilityInfo>(); AU.addRequired<MachineBlockFrequencyInfo>(); if (TailDupPlacement) - AU.addRequired<MachinePostDominatorTree>(); + AU.addRequired<MachinePostDominatorTreeWrapperPass>(); AU.addRequired<MachineLoopInfo>(); AU.addRequired<ProfileSummaryInfoWrapperPass>(); AU.addRequired<TargetPassConfig>(); @@ -624,7 +624,7 @@ INITIALIZE_PASS_BEGIN(MachineBlockPlacement, DEBUG_TYPE, "Branch Probability Basic Block Placement", false, false) INITIALIZE_PASS_DEPENDENCY(MachineBranchProbabilityInfo) INITIALIZE_PASS_DEPENDENCY(MachineBlockFrequencyInfo) -INITIALIZE_PASS_DEPENDENCY(MachinePostDominatorTree) +INITIALIZE_PASS_DEPENDENCY(MachinePostDominatorTreeWrapperPass) INITIALIZE_PASS_DEPENDENCY(MachineLoopInfo) INITIALIZE_PASS_DEPENDENCY(ProfileSummaryInfoWrapperPass) INITIALIZE_PASS_END(MachineBlockPlacement, DEBUG_TYPE, @@ -3417,7 +3417,7 @@ bool MachineBlockPlacement::runOnMachineFunction(MachineFunction &MF) { TailDupSize = TII->getTailDuplicateSize(PassConfig->getOptLevel()); if (allowTailDupPlacement()) { - MPDT = &getAnalysis<MachinePostDominatorTree>(); + MPDT = &getAnalysis<MachinePostDominatorTreeWrapperPass>().getPostDomTree(); bool OptForSize = MF.getFunction().hasOptSize() || llvm::shouldOptimizeForSize(&MF, PSI, &MBFI->getMBFI()); if (OptForSize) @@ -3449,7 +3449,7 @@ bool MachineBlockPlacement::runOnMachineFunction(MachineFunction &MF) { ComputedEdges.clear(); // Must redo the post-dominator tree if blocks were changed. if (MPDT) - MPDT->runOnMachineFunction(MF); + MPDT->recalculate(MF); ChainAllocator.DestroyAll(); buildCFGChains(); } |