[all-commits] [llvm/llvm-project] d4ddf0: [NFCI]Remove EntryCount from FunctionSummary and c...

Mingming Liu via All-commits all-commits at lists.llvm.org
Fri Sep 6 16:38:39 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d4ddf06b0c7f38612f334db71ef1d7a58a3cc8e0
      https://github.com/llvm/llvm-project/commit/d4ddf06b0c7f38612f334db71ef1d7a58a3cc8e0
  Author: Mingming Liu <mingmingl at google.com>
  Date:   2024-09-06 (Fri, 06 Sep 2024)

  Changed paths:
    M clang/docs/tools/clang-formatted-files.txt
    M llvm/include/llvm/IR/ModuleSummaryIndex.h
    M llvm/include/llvm/IR/ModuleSummaryIndexYAML.h
    R llvm/include/llvm/LTO/SummaryBasedOptimizations.h
    R llvm/include/llvm/Transforms/IPO/SyntheticCountsPropagation.h
    M llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
    M llvm/lib/AsmParser/LLParser.cpp
    M llvm/lib/Bitcode/Reader/BitcodeReader.cpp
    M llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
    M llvm/lib/IR/ModuleSummaryIndex.cpp
    M llvm/lib/LTO/CMakeLists.txt
    M llvm/lib/LTO/LTO.cpp
    R llvm/lib/LTO/SummaryBasedOptimizations.cpp
    M llvm/lib/LTO/ThinLTOCodeGenerator.cpp
    M llvm/lib/Passes/PassBuilder.cpp
    M llvm/lib/Passes/PassBuilderPipelines.cpp
    M llvm/lib/Passes/PassRegistry.def
    M llvm/lib/Transforms/IPO/CMakeLists.txt
    R llvm/lib/Transforms/IPO/SyntheticCountsPropagation.cpp
    M llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
    R llvm/test/Bitcode/thinlto-synthetic-count-flag.ll
    R llvm/test/ThinLTO/X86/function_entry_count.ll
    R llvm/test/Transforms/SyntheticCountsPropagation/initial.ll
    R llvm/test/Transforms/SyntheticCountsPropagation/prop.ll
    R llvm/test/Transforms/SyntheticCountsPropagation/scc.ll
    M llvm/utils/gn/secondary/llvm/lib/LTO/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Transforms/IPO/BUILD.gn

  Log Message:
  -----------
  [NFCI]Remove EntryCount from FunctionSummary and clean up surrounding synthetic count passes. (#107471)

The primary motivation is to remove `EntryCount` from `FunctionSummary`.
This frees 8 bytes out of `sizeof(FunctionSummary)` (136 bytes as of
https://github.com/llvm/llvm-project/commit/64498c54831bed9cf069e0923b9b73678c6451d8).

While I'm at it, this PR clean up {SummaryBasedOptimizations,
SyntheticCountsPropagation} since they were not used and there are no
plans to further invest on them.

With this patch, bitcode writer writes a placeholder 0 at the byte
offset of `EntryCount` and bitcode reader can parse the function entry
count at the correct byte offset. Added a TODO to stop writing
`EntryCount` and bump bitcode version



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list