[PATCH] D103977: [lld-macho][nfc] Move liveness-tracking fields into ConcatInputSection

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 9 10:25:28 PDT 2021


int3 created this revision.
int3 added a reviewer: lld-macho.
Herald added a subscriber: jfb.
Herald added a reviewer: gkm.
Herald added a project: lld-macho.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

These fields currently live in the parent InputSection class,
but they should be specific to ConcatInputSection, since the other
InputSection classes (that contain literals) aren't atomically live or
dead -- rather their component string/int literals should have
individual liveness states. (An upcoming diff will add liveness bits for
StringPieces and fixed-sized literals.)

I also factored out some asserts for isCoalescedWeak() in MarkLive.cpp.
We now avoid putting coalesced sections in the `inputSections` vector,
so we don't have to check/assert against it everywhere.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103977

Files:
  lld/MachO/Driver.cpp
  lld/MachO/InputSection.h
  lld/MachO/MarkLive.cpp
  lld/MachO/SymbolTable.cpp
  lld/MachO/Symbols.cpp
  lld/MachO/Symbols.h
  lld/MachO/UnwindInfoSection.cpp
  lld/MachO/UnwindInfoSection.h
  lld/MachO/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103977.350942.patch
Type: text/x-patch
Size: 13790 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210609/a46ccc7b/attachment.bin>


More information about the llvm-commits mailing list