[llvm] [NewPM] Port MachineDominanceFrontierAnalysis (PR #177709)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 31 06:50:11 PST 2026
================
@@ -21,32 +21,56 @@ template class DominanceFrontierBase<MachineBasicBlock, true>;
template class ForwardDominanceFrontierBase<MachineBasicBlock>;
}
+char MachineDominanceFrontierWrapperPass::ID = 0;
-char MachineDominanceFrontier::ID = 0;
-
-INITIALIZE_PASS_BEGIN(MachineDominanceFrontier, "machine-domfrontier",
- "Machine Dominance Frontier Construction", true, true)
+INITIALIZE_PASS_BEGIN(MachineDominanceFrontierWrapperPass,
+ "machine-domfrontier",
+ "Machine Dominance Frontier Construction", true, true)
INITIALIZE_PASS_DEPENDENCY(MachineDominatorTreeWrapperPass)
-INITIALIZE_PASS_END(MachineDominanceFrontier, "machine-domfrontier",
- "Machine Dominance Frontier Construction", true, true)
+INITIALIZE_PASS_END(MachineDominanceFrontierWrapperPass, "machine-domfrontier",
+ "Machine Dominance Frontier Construction", true, true)
-MachineDominanceFrontier::MachineDominanceFrontier()
+MachineDominanceFrontierWrapperPass::MachineDominanceFrontierWrapperPass()
: MachineFunctionPass(ID) {}
-char &llvm::MachineDominanceFrontierID = MachineDominanceFrontier::ID;
+char &llvm::MachineDominanceFrontierID =
+ MachineDominanceFrontierWrapperPass::ID;
+
+bool MachineDominanceFrontier::invalidate(
+ MachineFunction &F, const PreservedAnalyses &PA,
+ MachineFunctionAnalysisManager::Invalidator &) {
+ auto PAC = PA.getChecker<MachineDominanceFrontierAnalysis>();
+ return !(PAC.preserved() ||
----------------
arsenm wrote:
demorgan condition
https://github.com/llvm/llvm-project/pull/177709
More information about the llvm-commits
mailing list