[llvm] [NFC] ProfileSummaryInfo: use analysis manager mechanisms for invalidation (PR #86086)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 13:15:29 PDT 2024


mtrofin wrote:

> I don't really see a reason behind this change. With the new PM you can either invalidate an analysis if you don't want to keep it up to date/valid, or you can keep the analysis valid yourself. The existing code is basically keeping the analysis valid, which seems fine to me.
> 
> This patch seems like it's adding extra pass infra code without much gain.

I thought manual state management is recommended / preferred if that's partial state updates - for example, updating parts of the BFI, stuff like that, where a full refresh would be expensive. Here, it's a wholesale update, semantically equivalent to dropping the current analysis and regenerating it. That's (I argue) the value of the patch: it clarifies that's what we are doing (a total refresh).

https://github.com/llvm/llvm-project/pull/86086


More information about the llvm-commits mailing list