[all-commits] [llvm/llvm-project] 557e1f: [lld-macho] Extend ICF to literal sections

Jez Ng via All-commits all-commits at lists.llvm.org
Mon Jun 28 11:50:01 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 557e1fa02f470bd4f14b7aa4060430007332895a
      https://github.com/llvm/llvm-project/commit/557e1fa02f470bd4f14b7aa4060430007332895a
  Author: Jez Ng <jezng at fb.com>
  Date:   2021-06-28 (Mon, 28 Jun 2021)

  Changed paths:
    M lld/MachO/Driver.cpp
    M lld/MachO/ICF.cpp
    M lld/MachO/InputSection.cpp
    M lld/MachO/Options.td
    M lld/MachO/SyntheticSections.cpp
    M lld/MachO/SyntheticSections.h
    M lld/MachO/Writer.cpp
    A lld/test/MachO/icf-literals.s

  Log Message:
  -----------
  [lld-macho] Extend ICF to literal sections

Literal sections can be deduplicated before running ICF. That makes it
easy to compare them during ICF: we can tell if two literals are
constant-equal by comparing their offsets in their OutputSection.

LLD-ELF takes a similar approach.

Reviewed By: #lld-macho, gkm

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


  Commit: 74d5f30d83f44ff3835a983bcce038f334cdbd6d
      https://github.com/llvm/llvm-project/commit/74d5f30d83f44ff3835a983bcce038f334cdbd6d
  Author: Jez Ng <jezng at fb.com>
  Date:   2021-06-28 (Mon, 28 Jun 2021)

  Changed paths:
    M lld/test/MachO/icf.s

  Log Message:
  -----------
  [lld-macho][nfc] Add absolute-vs-non-absolute symbol test for ICF

Make sure we don't wrongly fold two sections that refer to
symbols with the same value if they are not both absolute /
non-absolute.

Reviewed By: #lld-macho, gkm

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


Compare: https://github.com/llvm/llvm-project/compare/43fadefb0e77...74d5f30d83f4


More information about the All-commits mailing list