<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 30, 2016 at 10:43 AM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><div>On Wed, Nov 30, 2016 at 1:29 AM, Sean Silva <span dir="ltr"><<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>></span> wrote:<br></div></span><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Mon, Nov 28, 2016 at 11:52 AM, David Blaikie via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You mean why are some debug sections compressed and not others? LLVM compresses any where the compressed size is smaller than the uncompressed size (ie: we don't compress really small sections where the overhead is gerater than the benefit)<br><br>Or if you mean: why do we compress debug sections but not non-debug sections? Probably because people who cared about debug info implemented it & no one looked at the overall benefit. And also probably the benefit to compress the (very large) debug sections was worth the compute overhead of compressing/decompressing.<br></div></blockquote><div><br></div></span><div>I actually wonder about this. For LLD, the cost of decompressing is likely to be quite high. LLD already spends a huge amount of its time for debug binaries doing string merging. And SHF_COMPRESSED uses gzip which can't decompress super fast (like 120MB/s on the output side in a quick measurement I just did; DRAM bandwidth is about 100x that). So there may be a net loss in linking performance when the input binaries are hot in disk cache.</div></div></div></div></blockquote><div><br></div></span><div>That depends on how close your object files are. If your build system is distributed, network can be a bottleneck, and compressing sections can be a net win. I agree that faster algorithms than gzip would be better though.</div></div></div></div></blockquote><div><br></div><div>The networking layer used to distribute the object files might already have its own compression. Same for the underlying filesystem.</div><div><br></div><div>-- Sean Silva</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>One way to mitigate this would be to use something like lz4 instead of gzip (which is designed for very fast decompression).</div><span class="m_423432463308986675HOEnZb"><font color="#888888"><div><br></div><div>-- Sean Silva</div></font></span><div><div class="m_423432463308986675h5"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br>So if we were to take a more holistic approach we might find that compressing particularly 'large' sections is what's important - regardless of whether they're debug or non-debug sections.<br></div><div class="m_423432463308986675m_4385907377748029388HOEnZb"><div class="m_423432463308986675m_4385907377748029388h5"><br><div class="gmail_quote"><div dir="ltr">On Mon, Nov 28, 2016 at 11:35 AM Rui Ueyama <<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">This may be a silly question, but why do we compress some sections and don't compress other sections? What is the criteria?</div><div class="gmail_extra m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><br class="m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><div class="gmail_quote m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">On Mon, Nov 28, 2016 at 9:45 AM, David Blaikie <span dir="ltr" class="m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><<a href="mailto:dblaikie@gmail.com" class="m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><blockquote class="gmail_quote m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><br class="m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><br class="m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><div class="gmail_quote m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><span class="m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><div dir="ltr" class="m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">On Mon, Nov 28, 2016 at 9:26 AM Rui Ueyama <<a href="mailto:ruiu@google.com" class="m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg" target="_blank">ruiu@google.com</a>> wrote:<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"></div><blockquote class="gmail_quote m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><div class="gmail_extra m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><div class="gmail_quote m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">On Mon, Nov 28, 2016 at 9:21 AM, David Blaikie <span dir="ltr" class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><<a href="mailto:dblaikie@gmail.com" class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><blockquote class="gmail_quote m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">tangentially related to compressed sections: Currently, I take it, lld decompresses all compressed input sections into memory before producing output, yes? Is there any chance in the future that lld might use a more streaming approach to reduce memory overhead? (ie: defer decompressing until output - and decompress/write out (possibly recompressing) in chunks, rather than necessary whole sections or all sections)</div></blockquote><div class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"></div></div></div></div><div dir="ltr" class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><div class="gmail_extra m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><div class="gmail_quote m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><div class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">Interesting idea. LLD currently decompresses all live (non-gc'ed) sections in memory because it may contain mergeable strings or (theoretically) EH frames that need to be handled specially. But for regular sections, we could use a streaming approach indeed. It doesn't only save memory but also improves performance because it eliminates one extra memory copy (we can write uncompressed data directly to the output buffer).</div></div></div></div></blockquote><div class="m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><br class="m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"></div></span><div class="m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">Yep - even for strings, you could read/process the strings into the stringmap in chunks, rather than reading the whole buffer in, then inserting them all. (also improves memory locality - so you don't read it all in, then go back and start cache missing on the beginning of the buffer to process them)<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><br class="m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">It comes to mind because of the memory optimizations I've been doing/looking at in the DWP tool.</div><div class="m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><div class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011h5 m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><div class="m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"> </div><blockquote class="gmail_quote m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><div class="gmail_extra m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><div class="gmail_quote m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><div class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"></div><blockquote class="gmail_quote m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><div class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><div class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681h5 m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><div class="gmail_quote m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"><div dir="ltr" class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">On Fri, Nov 25, 2016 at 12:15 PM Rui Ueyama via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"></div><blockquote class="gmail_quote m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ruiu<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
Date: Fri Nov 25 14:05:08 2016<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
New Revision: 287946<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=287946&view=rev" rel="noreferrer" class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject?rev=287946&view=rev</a><br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
Log:<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
Parallelize uncompress() and splitIntoPieces().<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
Uncompressing section contents and spliting mergeable section contents<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
into smaller chunks are heavy tasks. They scan entire section contents<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
and do CPU-intensive tasks such as uncompressing zlib-compressed data<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
or computing a hash value for each section piece.<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
Luckily, these tasks are independent to each other, so we can do that<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
in parallel_for_each. The number of input sections is large (as opposed<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
to the number of output sections), so there's a large parallelism here.<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
Actually the current design to call uncompress() and splitIntoPieces()<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
in batch was chosen with doing this in mind. Basically what we need to<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
do here is to replace `for` with `parallel_for_each`.<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
It seems this patch improves latency significantly if linked programs<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
contain debug info (which in turn contain lots of mergeable strings.)<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
For example, the latency to link Clang (debug build) improved by 20% on<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
my machine as shown below. Note that ld.gold took 19.2 seconds to do<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
the same thing.<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
Before:<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
30801.782712 task-clock (msec) # 3.652 CPUs utilized ( +- 2.59% )<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
104,084 context-switches # 0.003 M/sec ( +- 1.02% )<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
5,063 cpu-migrations # 0.164 K/sec ( +- 13.66% )<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
2,528,130 page-faults # 0.082 M/sec ( +- 0.47% )<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
85,317,809,130 cycles # 2.770 GHz ( +- 2.62% )<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
67,352,463,373 stalled-cycles-frontend # 78.94% frontend cycles idle ( +- 3.06% )<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<not supported> stalled-cycles-backend<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
44,295,945,493 instructions # 0.52 insns per cycle<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
# 1.52 stalled cycles per insn ( +- 0.44% )<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
8,572,384,877 branches # 278.308 M/sec ( +- 0.66% )<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
141,806,726 branch-misses # 1.65% of all branches ( +- 0.13% )<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
8.433424003 seconds time elapsed ( +- 1.20% )<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
After:<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
35523.764575 task-clock (msec) # 5.265 CPUs utilized ( +- 2.67% )<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
159,107 context-switches # 0.004 M/sec ( +- 0.48% )<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
8,123 cpu-migrations # 0.229 K/sec ( +- 23.34% )<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
2,372,483 page-faults # 0.067 M/sec ( +- 0.36% )<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
98,395,342,152 cycles # 2.770 GHz ( +- 2.62% )<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
79,294,670,125 stalled-cycles-frontend # 80.59% frontend cycles idle ( +- 3.03% )<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<not supported> stalled-cycles-backend<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
46,274,151,813 instructions # 0.47 insns per cycle<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
# 1.71 stalled cycles per insn ( +- 0.47% )<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
8,987,621,670 branches # 253.003 M/sec ( +- 0.60% )<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
148,900,624 branch-misses # 1.66% of all branches ( +- 0.27% )<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
6.747548004 seconds time elapsed ( +- 0.40% )<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
Modified:<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
lld/trunk/ELF/Driver.cpp<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
lld/trunk/ELF/InputSection.cpp<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
Modified: lld/trunk/ELF/Driver.cpp<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=287946&r1=287945&r2=287946&view=diff" rel="noreferrer" class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/lld/trunk/ELF/Driver.cpp<wbr>?rev=287946&r1=287945&r2=28794<wbr>6&view=diff</a><br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
--- lld/trunk/ELF/Driver.cpp (original)<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+++ lld/trunk/ELF/Driver.cpp Fri Nov 25 14:05:08 2016<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
@@ -20,6 +20,7 @@<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
#include "Target.h"<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
#include "Writer.h"<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
#include "lld/Config/Version.h"<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+#include "lld/Core/Parallel.h"<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
#include "lld/Driver/Driver.h"<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
#include "llvm/ADT/StringExtras.h"<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
#include "llvm/ADT/StringSwitch.h"<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
@@ -800,14 +801,15 @@ template <class ELFT> void LinkerDriver:<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
// MergeInputSection::splitIntoPi<wbr>eces needs to be called before<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
// any call of MergeInputSection::getOffset. Do that.<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
- for (InputSectionBase<ELFT> *S : Symtab.Sections) {<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
- if (!S->Live)<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
- continue;<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
- if (S->Compressed)<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
- S->uncompress();<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
- if (auto *MS = dyn_cast<MergeInputSection<ELF<wbr>T>>(S))<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
- MS->splitIntoPieces();<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
- }<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+ parallel_for_each(Symtab.Secti<wbr>ons.begin(), Symtab.Sections.end(),<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+ [](InputSectionBase<ELFT> *S) {<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+ if (!S->Live)<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+ return;<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+ if (S->Compressed)<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+ S->uncompress();<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+ if (auto *MS = dyn_cast<MergeInputSection<ELF<wbr>T>>(S))<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+ MS->splitIntoPieces();<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+ });<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
// Write the result to the file.<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
writeResult<ELFT>();<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
Modified: lld/trunk/ELF/InputSection.cpp<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=287946&r1=287945&r2=287946&view=diff" rel="noreferrer" class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/lld/trunk/ELF/InputSecti<wbr>on.cpp?rev=287946&r1=287945&r2<wbr>=287946&view=diff</a><br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
--- lld/trunk/ELF/InputSection.cpp (original)<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+++ lld/trunk/ELF/InputSection.cpp Fri Nov 25 14:05:08 2016<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
@@ -22,6 +22,7 @@<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
#include "llvm/Support/Compression.h"<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
#include "llvm/Support/Endian.h"<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+#include <mutex><br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
using namespace llvm;<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
using namespace llvm::ELF;<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
@@ -160,6 +161,8 @@ InputSectionBase<ELFT>::getRaw<wbr>Compressed<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
return {Data.slice(sizeof(*Hdr)), read64be(Hdr->Size)};<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
}<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+// Uncompress section contents. Note that this function is called<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+// from parallel_for_each, so it must be thread-safe.<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
template <class ELFT> void InputSectionBase<ELFT>::uncomp<wbr>ress() {<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
if (!zlib::isAvailable())<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
fatal(toString(this) +<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
@@ -179,7 +182,12 @@ template <class ELFT> void InputSectionB<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
std::tie(Buf, Size) = getRawCompressedData(Data);<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
// Uncompress Buf.<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
- char *OutputBuf = BAlloc.Allocate<char>(Size);<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+ char *OutputBuf;<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+ {<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+ static std::mutex Mu;<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+ std::lock_guard<std::mutex> Lock(Mu);<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+ OutputBuf = BAlloc.Allocate<char>(Size);<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+ }<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
if (zlib::uncompress(toStringRef(<wbr>Buf), OutputBuf, Size) != zlib::StatusOK)<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
fatal(toString(this) + ": error while uncompressing section");<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
Data = ArrayRef<uint8_t>((uint8_t *)OutputBuf, Size);<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
@@ -746,6 +754,12 @@ MergeInputSection<ELFT>::Merge<wbr>InputSecti<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
StringRef Name)<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
: InputSectionBase<ELFT>(F, Header, Name, InputSectionBase<ELFT>::Merge) {}<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+// This function is called after we obtain a complete list of input sections<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+// that need to be linked. This is responsible to split section contents<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+// into small chunks for further processing.<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+//<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+// Note that this function is called from parallel_for_each. This must be<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
+// thread-safe (i.e. no memory allocation from the pools).<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
template <class ELFT> void MergeInputSection<ELFT>::split<wbr>IntoPieces() {<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
ArrayRef<uint8_t> Data = this->Data;<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
uintX_t EntSize = this->Entsize;<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
______________________________<wbr>_________________<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
llvm-commits mailing list<br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<a href="mailto:llvm-commits@lists.llvm.org" class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a><br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br class="m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827m_1013095670069503067m_6955820812283522681m_429543170170518987gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367m_-6926159485419900011m_661720059328286827gmail_msg m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg">
</blockquote></div></div></div></div>
</blockquote></div></div></div></blockquote></div></div></div></div>
</blockquote></div><br class="m_423432463308986675m_4385907377748029388m_5020214318581857367gmail_msg"></div>
</blockquote></div>
</div></div><br>______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div></div></div><br></div></div>
</blockquote></div></div></div><br></div></div>
</blockquote></div><br></div></div>