[PGO] Early detection regarding whether pgo counter promotion is possible
Patch by Chris Chrulski This fixes a problem with the current behavior when assertions are enabled. A loop that exits to a catchswitch instruction is skipped for the counter promotion, however this check was being done after the PGOCounterPromoter tried to collect an insertion point for the exit block. A call to getFirstInsertionPt() on a block that begins with a catchswitch instruction triggers an assertion. This change performs a check whether the counter promotion is possible prior to collecting the ExitBlocks and InsertPts. Differential Revision: https://reviews.llvm.org/D73222
Loading
Please sign in to comment