Page MenuHomePhabricator

Garbage-collect common symbols.
ClosedPublic

Authored by ruiu on Aug 9 2017, 1:16 PM.

Details

Summary

Liveness is usually a notion of input sections, but this patch adds
"liveness" bit to common symbols because they don't belong to any
input section.

This patch is based on https://reviews.llvm.org/D36520

Diff Detail

Repository
rL LLVM

Event Timeline

ruiu created this revision.Aug 9 2017, 1:16 PM
ruiu updated this revision to Diff 110474.Aug 9 2017, 1:59 PM
  • Address review comment.
grimar accepted this revision.EditedAug 10 2017, 12:44 AM

LGTM, thanks !

lld/ELF/Symbols.h
165 ↗(On Diff #110474)

Should it be unsigned isLive: 1 ? (for consistency with flags in SymbolBody)

This revision is now accepted and ready to land.Aug 10 2017, 12:44 AM
This revision was automatically updated to reflect the committed changes.
ruiu added inline comments.Aug 10 2017, 8:56 AM
lld/ELF/Symbols.h
165 ↗(On Diff #110474)

No, you don't want to use bitfields unless it is necessary. bool is the standard type to represent a true/false variable.