[PATCH] D36963: Use sorting instead of a lot of stable_partitions for `ICF::segregate` function
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 24 08:12:33 PDT 2017
ruiu added inline comments.
================
Comment at: lld/COFF/ICF.cpp:178
+
+ return 0;
}
----------------
ruiu wrote:
> return false;
You missed this one.
================
Comment at: lld/COFF/ICF.cpp:177-180
// Compare relocations.
- auto Eq = [&](const coff_relocation &R1, const coff_relocation &R2) {
+ if (A->NumRelocs != B->NumRelocs)
+ return A->NumRelocs < B->NumRelocs;
+
----------------
I believe you don't need this because sections with different number of relocations are already bin into different equivalence classes by lessConstant.
https://reviews.llvm.org/D36963
More information about the llvm-commits
mailing list