[all-commits] [llvm/llvm-project] 40bcbe: [lld-macho][nfc] InputSections don't need to track...

Jez Ng via All-commits all-commits at lists.llvm.org
Fri Dec 10 22:02:15 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 40bcbe48e8ecefc6f873acef10f3265401008655
      https://github.com/llvm/llvm-project/commit/40bcbe48e8ecefc6f873acef10f3265401008655
  Author: Jez Ng <jezng at fb.com>
  Date:   2021-12-11 (Sat, 11 Dec 2021)

  Changed paths:
    M lld/MachO/ConcatOutputSection.cpp
    M lld/MachO/InputSection.h

  Log Message:
  -----------
  [lld-macho][nfc] InputSections don't need to track their total # of callsites

... only whether they have more than zero. This simplifies the code slightly.

I've also moved the field into the ConcatInputSection subclass since it doesn't
actually get used by the other InputSections.

Reviewed By: #lld-macho, oontvoo

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


  Commit: 098430cd25e7d1d5035932db2e4e5f9fb72adfee
      https://github.com/llvm/llvm-project/commit/098430cd25e7d1d5035932db2e4e5f9fb72adfee
  Author: Jez Ng <jezng at fb.com>
  Date:   2021-12-11 (Sat, 11 Dec 2021)

  Changed paths:
    M lld/MachO/InputFiles.cpp
    M lld/MachO/InputFiles.h
    M lld/MachO/SyntheticSections.cpp

  Log Message:
  -----------
  [lld-macho][nfc] Simplify LC_DATA_IN_CODE generation

1. After D113241, we have the section address easily accessible and no
   longer need to iterate across the LC_SEGMENT commands to emit
   LC_DATA_IN_CODE.

2. There's no need to store a pointer to the data in code entries during
   the parse step; we can just look it up as part of the output step.

Reviewed By: #lld-macho, thakis

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


Compare: https://github.com/llvm/llvm-project/compare/cdd5fb6e19c8...098430cd25e7


More information about the All-commits mailing list