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

Pranav Kant via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 11 15:05:58 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,
----------------
pranavk wrote:

That would complicate things vs the current version of this PR where things are kept simple and thread-safe, but I can try taking a look if there's a way to do this without increasing the complexity (we rejected the previous version of the PR due to complexity)

I am also not sure if that's what Fangrui is concerned about in the original comment. 

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


More information about the llvm-commits mailing list