[llvm-branch-commits] [llvm] [WebAssembly] Port WebAssemblyExceptionAnalysis (PR #210246)
Aiden Grossman via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jul 22 07:31:36 PDT 2026
================
@@ -207,3 +239,14 @@ void WebAssemblyExceptionInfo::print(raw_ostream &OS, const Module *) const {
for (auto &WE : TopLevelExceptions)
WE->print(OS);
}
+
+bool WebAssemblyExceptionInfo::invalidate(
+ MachineFunction &MF, const PreservedAnalyses &PA,
+ MachineFunctionAnalysisManager::Invalidator &) {
+ // Check whether the analysis, all analyses on machine functions, or the
+ // machine function's CFG have been preserved.
+ auto PAC = PA.getChecker<MachineBlockFrequencyAnalysis>();
+ return !PAC.preserved() &&
+ !PAC.preservedSet<AllAnalysesOn<MachineFunction>>() &&
+ !PAC.preservedSet<CFGAnalyses>();
----------------
boomanaiden154 wrote:
We're saying that we only invalidate the analysis if the analysis itself is not marked as preserved (`!PAC.preserved()`), all MachineFunction analyses are not marked as preserved, and the pass author does not mark CFGAnalyses as preserved.
https://github.com/llvm/llvm-project/pull/210246
More information about the llvm-branch-commits
mailing list