[all-commits] [llvm/llvm-project] b43a1d: [PGO] Do not create block count annotations when a...

Wolfgang Pieb via All-commits all-commits at lists.llvm.org
Thu Oct 13 14:58:24 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b43a1d1bd97816d32388e78fd5659f732edc82c9
  Author: Wolfgang Pieb <wolfgang_pieb at playstation.sony.com>
  Date:   2022-10-13 (Thu, 13 Oct 2022)

  Changed paths:
    M llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
    M llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp
    A llvm/test/Transforms/PGOProfile/Inputs/maxcountzero.proftext
    A llvm/test/Transforms/PGOProfile/maxcountzero.ll

  Log Message:
  [PGO] Do not create block count annotations when all weights are 0,
avoiding an assertion.

A BB with a nonzero count, whose successor blocks all have 0 counts, could
cause an assertion. Don't create any branch weights in this case.

Reviewed By: xur

Differential Revision: https://reviews.llvm.org/D134203

More information about the All-commits mailing list