[llvm] [BPI] Cache LoopExitBlocks to improve compile time (PR #93451)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon May 27 03:08:25 PDT 2024
================
@@ -343,6 +343,9 @@ class BranchProbabilityInfo {
/// Keeps mapping of a loop to estimated weight to enter the loop.
SmallDenseMap<LoopData, uint32_t> EstimatedLoopWeight;
+ /// Keeps mapping of a Loop to its "exit" blocks.
+ SmallDenseMap<LoopData, SmallVector<BasicBlock *, 4>> LoopExitBlocks;
----------------
nikic wrote:
Can this be a local variable in computeEestimateBlockWeight? Just to make it clear that there are no invalidation concerns...
https://github.com/llvm/llvm-project/pull/93451
More information about the llvm-commits
mailing list