[llvm] [GenericCycle] Add a Cache for getExitBlocks in GenericCycle (PR #112290)

Sameer Sahasrabuddhe via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 14 21:58:58 PDT 2024


ssahasra wrote:

The cache seems useful, and I have always wondered why LoopInfo does not have something similar. But please note that all non-const member functions in GenericCycle and GenericCycleInfo should clear this cache. For example, `GenericCycle::setSingleEntry()` and `GenericCycleInfo::addBlockToCycle()`.

Adding @arsenm as reviewer to comment on whether having a cache like this is generally okay in LLVM. If we do put this cache, then GenericCycle is a better place than UniformityAnalysis, so that it gets wider use.

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


More information about the llvm-commits mailing list