[PATCH] D28481: Respect section groups in GC

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 10 15:24:07 PST 2017


ruiu added a comment.

In https://reviews.llvm.org/D28481#641827, @eugenis wrote:

> In https://reviews.llvm.org/D28481#640940, @ruiu wrote:
>
> > Hm, now I recall why we did that for C identifier sections. Sections with C identifier names can be garbage collected if no one is referring them, but that cannot be determined until we create output sections, and when we create output sections, it is usually too late to do GC. We could do something tricky to handle that, but it's probably not worth it.
> >
> > So, maybe I'm fine with this. But I think the implementation can be simplified. It feels it is doing too much ahead of time.
>
>
> Could you elaborate? All this code does is store two words per each section that participates in a group. We do need to store the inverse dependency somewhere...


Please avoid instantiating sections that are to be nullified with Discarded section. Previously, we didn't instantiate sections if they are discarded, but with this patch, all sections are instantiated whether they are going to be discarded or not.


Repository:
  rL LLVM

https://reviews.llvm.org/D28481





More information about the llvm-commits mailing list