[all-commits] [llvm/llvm-project] 886629: [SampleFDO] New hierarchical discriminator for Flo...

xur-llvm via All-commits all-commits at lists.llvm.org
Tue May 18 16:27:34 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 886629a8c9e58752627d8ae7abf6fa93191a3df8
      https://github.com/llvm/llvm-project/commit/886629a8c9e58752627d8ae7abf6fa93191a3df8
  Author: Rong Xu <xur at google.com>
  Date:   2021-05-18 (Tue, 18 May 2021)

  Changed paths:
    A llvm/include/llvm/CodeGen/MIRFSDiscriminator.h
    M llvm/include/llvm/CodeGen/Passes.h
    M llvm/include/llvm/IR/DebugInfoMetadata.h
    M llvm/include/llvm/InitializePasses.h
    M llvm/include/llvm/LTO/Config.h
    A llvm/include/llvm/Support/Discriminator.h
    M llvm/lib/CodeGen/CMakeLists.txt
    A llvm/lib/CodeGen/MIRFSDiscriminator.cpp
    M llvm/lib/CodeGen/TargetPassConfig.cpp
    M llvm/lib/IR/DebugInfoMetadata.cpp
    M llvm/lib/LTO/LTOBackend.cpp
    M llvm/lib/Transforms/Utils/LoopUnroll.cpp
    M llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    A llvm/test/CodeGen/X86/fsafdo_test1.ll
    A llvm/test/CodeGen/X86/fsafdo_test2.ll

  Log Message:
  -----------
  [SampleFDO] New hierarchical discriminator for Flow Sensitive SampleFDO

This patch implements first part of Flow Sensitive SampleFDO (FSAFDO).
It has the following changes:
(1) disable current discriminator encoding scheme,
(2) new hierarchical discriminator for FSAFDO.

For this patch, option "-enable-fs-discriminator=true" turns on the new
functionality. Option "-enable-fs-discriminator=false" (the default)
keeps the current SampleFDO behavior. When the fs-discriminator is
enabled, we insert a flag variable, namely, llvm_fs_discriminator, to
the object. This symbol will checked by create_llvm_prof tool, and used
to generate a profile with FS-AFDO discriminators enabled. If this
happens, for an extbinary format profile, create_llvm_prof tool
will add a flag to profile summary section.

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




More information about the All-commits mailing list