[all-commits] [llvm/llvm-project] 3adc6e: [ThinLTO] Remove BlockCount for non partial sample...

Teresa Johnson via All-commits all-commits at lists.llvm.org
Thu Apr 20 11:45:40 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3adc6e03080c6d38a51f5c5b6744b7c0d9c7541b
      https://github.com/llvm/llvm-project/commit/3adc6e03080c6d38a51f5c5b6744b7c0d9c7541b
  Author: Teresa Johnson <tejohnson at google.com>
  Date:   2023-04-20 (Thu, 20 Apr 2023)

  Changed paths:
    M lld/test/COFF/thinlto-index-only.ll
    M lld/test/ELF/lto/thinlto-emit-index.ll
    M lld/test/ELF/lto/thinlto-index-only.ll
    M lld/test/MachO/thinlto-emit-index.ll
    M lld/test/MachO/thinlto-index-only.ll
    M llvm/include/llvm/IR/ModuleSummaryIndex.h
    M llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
    M llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
    A llvm/test/Bitcode/Inputs/thinlto-function-summary-callgraph-partial-sample-profile-summary.ll
    M llvm/test/Bitcode/thinlto-alias.ll
    M llvm/test/Bitcode/thinlto-alias2.ll
    M llvm/test/Bitcode/thinlto-function-summary-callgraph-cast.ll
    A llvm/test/Bitcode/thinlto-function-summary-callgraph-partial-sample-profile-summary.ll
    M llvm/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll
    M llvm/test/Bitcode/thinlto-function-summary-callgraph-profile-summary.ll
    M llvm/test/Bitcode/thinlto-function-summary-callgraph-relbf.ll
    M llvm/test/Bitcode/thinlto-function-summary-callgraph-sample-profile-summary.ll
    M llvm/test/Bitcode/thinlto-function-summary-callgraph.ll
    M llvm/test/Bitcode/thinlto-function-summary-originalnames.ll
    M llvm/test/Bitcode/thinlto-function-summary-paramaccess.ll
    M llvm/test/Bitcode/thinlto-function-summary.ll
    M llvm/test/Bitcode/thinlto-index-disassembled-by-llvm-dis.ll
    M llvm/test/ThinLTO/X86/distributed_indexes.ll
    M llvm/test/tools/gold/X86/thinlto.ll
    M llvm/test/tools/llvm-lto/thinlto.ll

  Log Message:
  -----------
  [ThinLTO] Remove BlockCount for non partial sample profile builds

As pointed out in
https://discourse.llvm.org/t/undeterministic-thin-index-file/69985, the
block count added to distributed ThinLTO index files breaks incremental
builds on ThinLTO - if any linked file has a different number of BBs,
then the accumulated sum placed in the index files will change, causing
all ThinLTO backend compiles to be redone.

The block count is only used for scaling of partial sample profiles, and
was added in D80403 for D79831.

This patch simply removes this field from the index files of non partial
sample profile compiles, which is NFC on the output of the compiler.

We subsequently need to see if this can be removed for partial sample
profiles without signficant performance loss, or redesigned in a way
that does not destroy caching.

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




More information about the All-commits mailing list