[llvm] [BPI] Cache LoopExitBlocks to improve compile time (PR #93451)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Tue May 28 04:39:43 PDT 2024


================
@@ -828,12 +829,14 @@ void BranchProbabilityInfo::computeEestimateBlockWeight(
   do {
     while (!LoopWorkList.empty()) {
       const LoopBlock LoopBB = LoopWorkList.pop_back_val();
-
-      if (EstimatedLoopWeight.count(LoopBB.getLoopData()))
+      const LoopData LD = LoopBB.getLoopData();
----------------
s-barannikov wrote:

Should this be a const-reference?


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


More information about the llvm-commits mailing list