[PATCH] D24616: [ELF] Improve section GC for comdat groups
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 15 12:26:59 PDT 2016
ruiu added inline comments.
================
Comment at: ELF/MarkLive.cpp:263-269
@@ -244,3 +262,9 @@
+
+ // Pass 2. Identify and mark reachable comdat groups.
+ for (ObjectFile<ELFT> *F : Symtab<ELFT>::X->getObjectFiles())
+ for (InputSectionBase<ELFT> *Sec : F->getComdatSections(LiveComdatGroups))
+ Enqueue({Sec->getFile(), Sec, 0});
+
while (!Q.empty())
forEachSuccessor<ELFT>(*Q.pop_back_val(), Enqueue);
}
----------------
I don't think this is correct because the last `forEachSuccessor` could mark a section in a comdat group live, so you want to repeat this process until converge.
Repository:
rL LLVM
https://reviews.llvm.org/D24616
More information about the llvm-commits
mailing list