[PATCH] D100917: [NewPM] Only invalidate modified functions' analyses in CGSCC passes
Yuanfang Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 21 16:57:24 PDT 2021
ychen added a comment.
> It seems awkward to enhance PreservedAnalyses to only apply to specific functions when this patch is explicitly doing exactly what we want. If you have a clean way of modeling this inside PreservedAnalyses I'm happy to go with that, but so far I think this is the cleanest way.
I was thinking something like `PreservedAnalyses::abandon(IRUnit, AnalysisID)` which only used to selectively invalidate inner IR units, but I've convinced myself that it may not worth it. Invalidating inner analyses through proxy should work well already.
> Passes were already directly managing the analysis managers, e.g. the inliner and argpromo would remove entries for deleted functions. And updateCGAndAnalysisManager() would also handle analysis manager updates.
I would argue that `updateCGAndAnalysisManager()` is kinda special (for coping with the CGSCCPM's complexity). I think the one in `argpromo` is not necessary since it already returns `PreservedAnalyses::none()`. `inliner` yes.
================
Comment at: llvm/lib/Transforms/IPO/FunctionAttrs.cpp:1631
+ for (Function *Changed : ChangedFunctions)
+ FAM.invalidate(*Changed, PreservedAnalyses::none());
+ // We have not changed the call graph or removed/added functions.
----------------
Is the function CFG preserved?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100917/new/
https://reviews.llvm.org/D100917
More information about the llvm-commits
mailing list