[PATCH] D129111: [ELF] Optimize getInputSections. NFC
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 5 01:49:27 PDT 2022
MaskRay created this revision.
MaskRay added a reviewer: peter.smith.
Herald added subscribers: StephenFan, arichardson, emaste.
Herald added a project: All.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
In the majority of cases (e.g. orphan sections), an OutputSection has at most
one InputSectionDescription. Allocating a vector is wasteful. Change the
return type to ArrayRef<InputSection *>. In the case of one InputSectionDescription,
reference the only isd->sections.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D129111
Files:
lld/ELF/OutputSections.cpp
lld/ELF/OutputSections.h
lld/ELF/Writer.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129111.442205.patch
Type: text/x-patch
Size: 4384 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220705/e0dbab52/attachment.bin>
More information about the llvm-commits
mailing list