[PATCH] D88830: [LLD][ELF] Improve ICF for relocations to ineligible sections via "aliases"

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 13 15:49:47 PDT 2020


MaskRay added inline comments.


================
Comment at: lld/ELF/ICF.cpp:228
     for (size_t i = begin; i < mid; ++i)
-      sections[i]->eqClass[next] = mid;
+      sections[i]->eqClass[next] = eqClass;
 
----------------
andrewng wrote:
> MaskRay wrote:
> > Inline the variable `eqClass`
> > 
> Just to clarify, you want me to replace `eqClass` with the expression `eqClassBase + mid`, i.e. bring the addition inside the `for` loop?
Yes. This is optimizable by the compiler


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88830/new/

https://reviews.llvm.org/D88830



More information about the llvm-commits mailing list