[all-commits] [llvm/llvm-project] b0154c: [InstrProf] Add pgo use block coverage test (#72443)

Ellis Hoag via All-commits all-commits at lists.llvm.org
Mon Nov 20 07:25:47 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b0154c36d6387272f7f961c22582693d2850d21c
      https://github.com/llvm/llvm-project/commit/b0154c36d6387272f7f961c22582693d2850d21c
  Author: Ellis Hoag <ellis.sparky.hoag at gmail.com>
  Date:   2023-11-20 (Mon, 20 Nov 2023)

  Changed paths:
    M llvm/lib/ProfileData/InstrProfReader.cpp
    M llvm/lib/ProfileData/InstrProfWriter.cpp
    A llvm/test/Transforms/PGOProfile/Inputs/coverage.proftext
    M llvm/test/Transforms/PGOProfile/coverage.ll

  Log Message:
  -----------
  [InstrProf] Add pgo use block coverage test (#72443)

Back in https://reviews.llvm.org/D124490 we added a block coverage mode
that instruments a subset of basic blocks using single byte counters to
get coverage for the whole function.

This commit adds a test to make sure that we correctly assign branch
weights based on the coverage profile.

I noticed this test was missing after seeing that we had no coverage on
`PGOUseFunc::populateCoverage()`

https://lab.llvm.org/coverage/coverage-reports/coverage/Users/buildslave/jenkins/workspace/coverage/llvm-project/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp.html#L1383




More information about the All-commits mailing list