[lld] [lld-macho] Remove cuIndices indirection in UnwindInfoSection. NFC (PR #170252)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 1 23:36:47 PST 2025


================
@@ -467,27 +464,24 @@ void UnwindInfoSectionImpl::finalize() {
   symbolsVec = symbols.takeVector();
   relocateCompactUnwind(cuEntries);
 
-  // Rather than sort & fold the 32-byte entries directly, we create a
-  // vector of indices to entries and sort & fold that instead.
----------------
MaskRay wrote:

It isn't worth the complexity. It might not be an optimization since there are several loops iterating over `cuEntries[cuIndices[i]]` (random access on `cuEntries`, not cache-friendly)...

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


More information about the llvm-commits mailing list