[all-commits] [llvm/llvm-project] a33acc: [PGO] Early detection regarding whether pgo counte...

Andy Kaylor via All-commits all-commits at lists.llvm.org
Fri Jan 24 09:56:13 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a33accde954fc0a2056d2538d107c6ac4143a917
      https://github.com/llvm/llvm-project/commit/a33accde954fc0a2056d2538d107c6ac4143a917
  Author: Andy Kaylor <andrew.kaylor at intel.com>
  Date:   2020-01-24 (Fri, 24 Jan 2020)

  Changed paths:
    M llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
    A llvm/test/Transforms/PGOProfile/counter_promo_exit_catchswitch.ll

  Log Message:
  -----------
  [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




More information about the All-commits mailing list