[PATCH] D34093: ELF: Move section merging before ICF. NFCI.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 11 16:29:30 PDT 2017


ruiu added inline comments.


================
Comment at: lld/ELF/Driver.cpp:1007-1008
 
-  // Do size optimizations: garbage collection and identical code folding.
+  // Do size optimizations: garbage collection, merging of SHF_MERGE sections
+  // and identical code folding.
   if (Config->GcSections)
----------------
I first read this comment as markLive does all these things. I guess this comment describes all the code until writeResult. This is a bit confusing.


================
Comment at: lld/ELF/Driver.cpp:1020-1021
                       S->uncompress();
                     if (auto *MS = dyn_cast<MergeInputSection>(S))
                       MS->splitIntoPieces();
                   });
----------------
Should we move this to `mergeSections`?


https://reviews.llvm.org/D34093





More information about the llvm-commits mailing list