[all-commits] [llvm/llvm-project] 41a681: [FS-AFDO][llvm-profgen] Generate profile with FS-A...

ictwanglei via All-commits all-commits at lists.llvm.org
Tue Nov 30 15:59:07 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 41a681ce096d7abcf5cb867bd6ec06ac5e8d948f
      https://github.com/llvm/llvm-project/commit/41a681ce096d7abcf5cb867bd6ec06ac5e8d948f
  Author: wlei <wlei at fb.com>
  Date:   2021-11-30 (Tue, 30 Nov 2021)

  Changed paths:
    A llvm/test/tools/llvm-profgen/Inputs/fs-discriminator.perfbin
    A llvm/test/tools/llvm-profgen/Inputs/fs-discriminator.raw.prof
    A llvm/test/tools/llvm-profgen/fs-discriminator.test
    M llvm/tools/llvm-profgen/PerfReader.cpp
    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:
  -----------
  [FS-AFDO][llvm-profgen] Generate profile with FS-AFDO discriminator

In order to support generating profile  with FS discriminator, three kind of changes are done in llvm-profgen:

1) Dissassemble .rodata section to check if FS discriminator var ('"__llvm_fs_discriminator__"') exists and set the corresponding flag in the binary.

2) Change the discriminator decoding in `getBaseDiscriminator` and `getDuplicationFactor`.

3) set true for `FunctionSamples::ProfileIsFS` to enable FS functionality in ProfileData.

Reviewed By: xur, hoy, wenlei

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




More information about the All-commits mailing list