[lld] [lld] Merge equivalent symbols found during ICF (PR #134342)

James Y Knight via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 15 02:47:51 PDT 2025


================
@@ -333,6 +333,28 @@ bool ICF<ELFT>::equalsConstant(const InputSection *a, const InputSection *b) {
              : constantEq(a, ra.relas, b, rb.relas);
 }
 
+template <class RelTy>
+static SmallVector<Symbol *> getReloc(const InputSection *sec,
----------------
jyknight wrote:

After this PR goes in can you do an NFC follow-up to rename the loops which are parallel to actually have a name that starts with "parallel"? (That this naming convention is only inconsistently used is why I made the thread -safety bug in the initial. I did not read the implementation to discover that forEachClass is parallel!).

https://github.com/llvm/llvm-project/pull/134342


More information about the llvm-commits mailing list