[all-commits] [llvm/llvm-project] 28277e: [AutoFDO][llvm-profgen] Report zero count for unex...

ictwanglei via All-commits all-commits at lists.llvm.org
Fri Sep 24 14:16:30 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 28277e9b48601dee7027ba6ed50554db821ba09b
      https://github.com/llvm/llvm-project/commit/28277e9b48601dee7027ba6ed50554db821ba09b
  Author: wlei <wlei at fb.com>
  Date:   2021-09-24 (Fri, 24 Sep 2021)

  Changed paths:
    M llvm/test/tools/llvm-profgen/inline-noprobe.test
    M llvm/test/tools/llvm-profgen/inline-noprobe2.test
    M llvm/tools/llvm-profgen/ProfileGenerator.cpp
    M llvm/tools/llvm-profgen/ProfileGenerator.h
    M llvm/tools/llvm-profgen/ProfiledBinary.cpp
    M llvm/tools/llvm-profgen/ProfiledBinary.h

  Log Message:
  -----------
  [AutoFDO][llvm-profgen] Report zero count for unexecuted part of function code

In order to be consistent with compiler that interprets zero count as unexecuted(cold), this change reports zero-value count for unexecuted part of function code. For the implementation, it leverages the range counter, initializes all the executed function range with the zero-value. After all ranges are merged and converted into disjoint ranges, the remaining zero count will indicates the unexecuted(cold) part of the function.

This change also extends the current `findDisjointRanges` method which now can support adding zero-value range.

Reviewed By: hoy, wenlei

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




More information about the All-commits mailing list