[PATCH] D121052: [lld-macho][nfc] Reduce size of icfEqClass hash

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 5 15:50:20 PST 2022


thakis added inline comments.


================
Comment at: lld/MachO/ICF.cpp:280
-          if (auto *dylibSym = dyn_cast<DylibSymbol>(sym))
-            hash += dylibSym->stubsHelperIndex;
-          else if (auto *defined = dyn_cast<Defined>(sym)) {
----------------
what happened to the dylibSym branch?


================
Comment at: lld/MachO/ICF.cpp:281
             if (defined->isec) {
-              if (auto isec = dyn_cast<ConcatInputSection>(defined->isec))
-                hash += defined->value + isec->icfEqClass[icfPass % 2];
+              if (auto referentIsec =
+                      dyn_cast<ConcatInputSection>(defined->isec))
----------------
if you want to rename this variable (why?), do that in a separate commit (doesn't need a review)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121052



More information about the llvm-commits mailing list