[all-commits] [llvm/llvm-project] cf83a7: [SHT_LLVM_BB_ADDR_MAP] Add an option to skip emitt...

Lei Wang via All-commits all-commits at lists.llvm.org
Fri Nov 22 11:51:55 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cf83a7fdc2dfac8220d9923a831181dccb9f7277
      https://github.com/llvm/llvm-project/commit/cf83a7fdc2dfac8220d9923a831181dccb9f7277
  Author: Lei Wang <wlei at fb.com>
  Date:   2024-11-22 (Fri, 22 Nov 2024)

  Changed paths:
    M llvm/include/llvm/Object/ELFTypes.h
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    M llvm/lib/Object/ELF.cpp
    M llvm/lib/ObjectYAML/ELFEmitter.cpp
    M llvm/test/CodeGen/X86/basic-block-address-map-pgo-features.ll
    A llvm/test/tools/llvm-readobj/ELF/bb-addr-map-skip-bb-entries.test
    M llvm/test/tools/yaml2obj/ELF/bb-addr-map-pgo-analysis-map.yaml
    M llvm/unittests/Object/ELFObjectFileTest.cpp
    M llvm/unittests/Object/ELFTypesTest.cpp

  Log Message:
  -----------
  [SHT_LLVM_BB_ADDR_MAP] Add an option to skip emitting bb entries (#114447)

Sometimes we want to use a `PgoAnalysisMap` feature that doesn't require
the BB entries info, e.g. only the `FuncEntryCount`, but the BB entries
is emitted by default, so I'm adding an option to skip the info for this
case to save the binary size(can save ~90% size of the section). For
implementation, it extends a new field(`OmitBBEntries`) in
`BBAddrMap::Features` for this and it's controlled by a switch
`--basic-block-address-map-skip-bb-entries`.

Note that this naturally supports backwards compatibility as the field
is zero for the old version, matches the decoding in the new version
llvm.



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