[PATCH] D20433: [ELF] - Lazy initialization of MergeInputSection class internals.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu May 19 07:31:27 PDT 2016


grimar created this revision.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar.

Patch implements a way to lazily fill the Offsets vector of MergeInputSection class.

There are few benefits from that. 
At fact we do not need to fill the offsets vector so early in class constructor.
It is possible that section can be gc collected so it would be just a waste
of memory and cpu time.

But main use case for me was needs of D20272 patch,
this changes can help to avoid data decompression for cases when
section is collected, because I plan to implement decompression on
this->getSectionData() call, what this patch should allow to do as at the time 
of such call should be is already known that data is required
for futher processing.


http://reviews.llvm.org/D20433

Files:
  ELF/InputSection.cpp
  ELF/InputSection.h
  ELF/OutputSections.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20433.57784.patch
Type: text/x-patch
Size: 5461 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160519/48fc48f5/attachment.bin>


More information about the llvm-commits mailing list