diff options
author | paperchalice <liujunchang97@outlook.com> | 2024-06-28 10:59:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-28 10:59:23 +0800 |
commit | d38b518e0444b42123ac05ac5cce267baecec294 (patch) | |
tree | aaf1bb85596b21b40ef8f35894c7ad5a7db5095c /llvm/lib/CodeGen/MachineSink.cpp | |
parent | e48c4011ca80385573f1b92793c75dc98abb228f (diff) | |
download | llvm-d38b518e0444b42123ac05ac5cce267baecec294.zip llvm-d38b518e0444b42123ac05ac5cce267baecec294.tar.gz llvm-d38b518e0444b42123ac05ac5cce267baecec294.tar.bz2 |
Reapply "[CodeGen][NewPM] Port machine-branch-prob to new pass manager" (#96858) (#96869)
This reverts commit ab58b6d58edf6a7c8881044fc716ca435d7a0156.
In `CodeGen/Generic/MachineBranchProb.ll`, `llc` crashed with dumped MIR
when targeting PowerPC. Move test to `llc/new-pm`, which is X86
specific.
Diffstat (limited to 'llvm/lib/CodeGen/MachineSink.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineSink.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineSink.cpp b/llvm/lib/CodeGen/MachineSink.cpp index 76947a4..4dabaab 100644 --- a/llvm/lib/CodeGen/MachineSink.cpp +++ b/llvm/lib/CodeGen/MachineSink.cpp @@ -187,7 +187,7 @@ namespace { AU.addRequired<MachineDominatorTreeWrapperPass>(); AU.addRequired<MachinePostDominatorTreeWrapperPass>(); AU.addRequired<MachineCycleInfoWrapperPass>(); - AU.addRequired<MachineBranchProbabilityInfo>(); + AU.addRequired<MachineBranchProbabilityInfoWrapperPass>(); AU.addPreserved<MachineCycleInfoWrapperPass>(); AU.addPreserved<MachineLoopInfo>(); if (UseBlockFreqInfo) @@ -273,7 +273,7 @@ char &llvm::MachineSinkingID = MachineSinking::ID; INITIALIZE_PASS_BEGIN(MachineSinking, DEBUG_TYPE, "Machine code sinking", false, false) -INITIALIZE_PASS_DEPENDENCY(MachineBranchProbabilityInfo) +INITIALIZE_PASS_DEPENDENCY(MachineBranchProbabilityInfoWrapperPass) INITIALIZE_PASS_DEPENDENCY(MachineDominatorTreeWrapperPass) INITIALIZE_PASS_DEPENDENCY(MachineCycleInfoWrapperPass) INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass) @@ -712,7 +712,7 @@ bool MachineSinking::runOnMachineFunction(MachineFunction &MF) { PDT = &getAnalysis<MachinePostDominatorTreeWrapperPass>().getPostDomTree(); CI = &getAnalysis<MachineCycleInfoWrapperPass>().getCycleInfo(); MBFI = UseBlockFreqInfo ? &getAnalysis<MachineBlockFrequencyInfo>() : nullptr; - MBPI = &getAnalysis<MachineBranchProbabilityInfo>(); + MBPI = &getAnalysis<MachineBranchProbabilityInfoWrapperPass>().getMBPI(); AA = &getAnalysis<AAResultsWrapperPass>().getAAResults(); RegClassInfo.runOnMachineFunction(MF); TargetPassConfig *PassConfig = &getAnalysis<TargetPassConfig>(); |