[PATCH] D80629: [yaml2obj] - Allocate the file space for SHT_NOBITS sections in some cases.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 29 02:08:29 PDT 2020
grimar marked an inline comment as done.
grimar added inline comments.
================
Comment at: llvm/lib/ObjectYAML/ELFEmitter.cpp:872
+ for (const ELFYAML::ProgramHeader &PH : Phdrs)
+ for (ELFYAML::Chunk *C : getChunksAfter(PH, S.Name))
+ if (isa<ELFYAML::Fill>(C) ||
----------------
grimar wrote:
> MaskRay wrote:
> > Inlining getChunksAfter can avoid the cost constructing a vector.
> I think the cost was very low: there is no much output sections usually, and the case when there are non-nobits sections after a nobit section is also probably rare. But it made the final code to be much shorter.
Perhaps my comment is not very clear: **inlining ** made the code shorter.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80629/new/
https://reviews.llvm.org/D80629
More information about the llvm-commits
mailing list