================ @@ -45,3 +45,9 @@ MachineFunctionAnalysis::run(Function &F, FunctionAnalysisManager &FAM) { return Result(std::move(MF)); } + +PreservedAnalyses FreeAllAnalysesPass::run(Function &F, + FunctionAnalysisManager &FAM) { + FAM.clear(F, F.getName()); ---------------- paperchalice wrote:
That is too aggressive, `clear` is used when corresponding IR (here is the function) is removed. I'd prefer a full template specialization for `InvalidateAnalysisPass`, which release the machine function and related analysis results. https://github.com/llvm/llvm-project/pull/139517 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits