diff options
| author | paperchalice <liujunchang97@outlook.com> | 2024-06-11 21:27:14 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-11 21:27:14 +0800 |
| commit | 837dc542b1519df343e5a8f7b2718483530a4193 (patch) | |
| tree | ea90fd5268cdd1e5dccfe50c4f2f6c62c9fda100 /llvm/lib/CodeGen/MachineUniformityAnalysis.cpp | |
| parent | 2b15fb16cee05e6fe56edc6bc24d4d31df48a115 (diff) | |
[CodeGen][NewPM] Split `MachineDominatorTree` into a concrete analysis result (#94571)
Prepare for new pass manager version of `MachineDominatorTreeAnalysis`.
We may need a machine dominator tree version of `DomTreeUpdater` to
handle `SplitCriticalEdge` in some CodeGen passes.
Diffstat (limited to 'llvm/lib/CodeGen/MachineUniformityAnalysis.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/MachineUniformityAnalysis.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineUniformityAnalysis.cpp b/llvm/lib/CodeGen/MachineUniformityAnalysis.cpp index 131138e0649e..7548fc8141ec 100644 --- a/llvm/lib/CodeGen/MachineUniformityAnalysis.cpp +++ b/llvm/lib/CodeGen/MachineUniformityAnalysis.cpp @@ -155,7 +155,7 @@ template struct llvm::GenericUniformityAnalysisImplDeleter< MachineUniformityInfo llvm::computeMachineUniformityInfo( MachineFunction &F, const MachineCycleInfo &cycleInfo, - const MachineDomTree &domTree, bool HasBranchDivergence) { + const MachineDominatorTree &domTree, bool HasBranchDivergence) { assert(F.getRegInfo().isSSA() && "Expected to be run on SSA form!"); MachineUniformityInfo UI(domTree, cycleInfo); if (HasBranchDivergence) @@ -187,19 +187,20 @@ MachineUniformityAnalysisPass::MachineUniformityAnalysisPass() INITIALIZE_PASS_BEGIN(MachineUniformityAnalysisPass, "machine-uniformity", "Machine Uniformity Info Analysis", true, true) INITIALIZE_PASS_DEPENDENCY(MachineCycleInfoWrapperPass) -INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree) +INITIALIZE_PASS_DEPENDENCY(MachineDominatorTreeWrapperPass) INITIALIZE_PASS_END(MachineUniformityAnalysisPass, "machine-uniformity", "Machine Uniformity Info Analysis", true, true) void MachineUniformityAnalysisPass::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AU.addRequired<MachineCycleInfoWrapperPass>(); - AU.addRequired<MachineDominatorTree>(); + AU.addRequired<MachineDominatorTreeWrapperPass>(); MachineFunctionPass::getAnalysisUsage(AU); } bool MachineUniformityAnalysisPass::runOnMachineFunction(MachineFunction &MF) { - auto &DomTree = getAnalysis<MachineDominatorTree>().getBase(); + auto &DomTree = + getAnalysis<MachineDominatorTreeWrapperPass>().getDomTree().getBase(); auto &CI = getAnalysis<MachineCycleInfoWrapperPass>().getCycleInfo(); // FIXME: Query TTI::hasBranchDivergence. -run-pass seems to end up with a // default NoTTI |
