[all-commits] [llvm/llvm-project] 6db04b: [lld-macho] Port CallGraphSort from COFF/ELF

Leonard Grey via All-commits all-commits at lists.llvm.org
Wed Jan 12 07:58:02 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6db04b97e6a2873cbf1252b7b6b7efedf3fceb4e
      https://github.com/llvm/llvm-project/commit/6db04b97e6a2873cbf1252b7b6b7efedf3fceb4e
  Author: Leonard Grey <lgrey at chromium.org>
  Date:   2022-01-12 (Wed, 12 Jan 2022)

  Changed paths:
    M lld/MachO/CMakeLists.txt
    A lld/MachO/CallGraphSort.cpp
    A lld/MachO/CallGraphSort.h
    M lld/MachO/Config.h
    M lld/MachO/Driver.cpp
    M lld/MachO/InputFiles.cpp
    M lld/MachO/InputFiles.h
    M lld/MachO/InputSection.h
    M lld/MachO/Options.td
    M lld/MachO/Writer.cpp
    A lld/test/MachO/cgprofile-icf.s
    A lld/test/MachO/cgprofile-obj.s
    A lld/test/MachO/cgprofile-print.s
    M llvm/utils/gn/secondary/lld/MachO/BUILD.gn

  Log Message:
  -----------
  [lld-macho] Port CallGraphSort from COFF/ELF

Depends on D112160

This adds the new options `--call-graph-profile-sort` (default),
`--no-call-graph-profile-sort` and `--print-symbol-order=`. If call graph
profile sorting is enabled, reads `__LLVM,__cg_profile` sections from object
files and uses the resulting graph to put callees and callers close to each
other in the final binary via the C3 clustering heuristic.

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




More information about the All-commits mailing list