[PATCH] D113344: [BPI] Push exit block rather than exiting ones in getSccExitBlocks

Bin Cheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 10 22:22:55 PST 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbf76e6485431: [BPI] Push exit block rather than exiting ones in getSccExitBlocks (authored by bin.cheng).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113344/new/

https://reviews.llvm.org/D113344

Files:
  llvm/lib/Analysis/BranchProbabilityInfo.cpp


Index: llvm/lib/Analysis/BranchProbabilityInfo.cpp
===================================================================
--- llvm/lib/Analysis/BranchProbabilityInfo.cpp
+++ llvm/lib/Analysis/BranchProbabilityInfo.cpp
@@ -190,7 +190,7 @@
     if (isSCCExitingBlock(BB, SccNum))
       for (const auto *Succ : successors(BB))
         if (getSCCNum(Succ) != SccNum)
-          Exits.push_back(const_cast<BasicBlock *>(BB));
+          Exits.push_back(const_cast<BasicBlock *>(Succ));
   }
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113344.386421.patch
Type: text/x-patch
Size: 490 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211111/57e46d7a/attachment.bin>


More information about the llvm-commits mailing list