[llvm] [coro][pgo] Don't promote pgo counters in the suspend basic block (PR #71263)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 15 12:57:37 PST 2023


================
@@ -242,8 +242,16 @@ class PGOCounterPromoter {
     if (!isPromotionPossible(&L, LoopExitBlocks))
       return;
 
+    auto IsSuspendBB = [&](BasicBlock *BB) {
----------------
mtrofin wrote:

This is a perfect segway to whether we should handle the suspend/switch pattern somewhere more centrally - I wouldn't be surprised other analyses would make incorrect inferences about the 'suspend (i.e. ret)' case.

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


More information about the llvm-commits mailing list