[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 22:00:34 PDT 2024
================
@@ -74,12 +74,16 @@ template <typename ContextT> class GenericCycle {
/// always have the same depth.
unsigned Depth = 0;
+ /// Cache for the results of GetExitBlocks
+ std::unique_ptr<SmallVector<BlockT *, 4>> ExitBlocksCache;
----------------
ssahasra wrote:
This unique_ptr is not required. The cache is just a vector and it does not even own the pointers in it. The vector can be declared without being a unique_ptr.
https://github.com/llvm/llvm-project/pull/112290
More information about the llvm-commits
mailing list