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

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 7 00:01:15 PST 2022


int3 added inline comments.


================
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))
----------------
thakis wrote:
> if you want to rename this variable (why?), do that in a separate commit (doesn't need a review)
> why?

It's shadowing the `isec` defined on line 275, which I found a bit confusing to read


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