<div dir="auto">Agree here duplication is less of problem than gnuish/fsfish/binutilish/gccish spaghetti code with no abstractions etc. and thousands of conditionals etc.<div dir="auto"><br></div><div dir="auto">- pawel</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">sob., 12.06.2021, 08:55 użytkownik Shoaib Meenai via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> napisał:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="m_-3021127747266447972WordSection1">
<p class="MsoNormal">To second what Jez said here: the new Mach-O backend is still pretty young (e.g. it wasn’t even the default Mach-O backend in LLVM 12). It’s being actively developed, and there’s still the possibility of fairly invasive changes being required
 to support new features or as we gain more implementation experience.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">One of our main motivations for LLD for Mach-O was to improve incremental build speeds for our developers. We’ve found that link speed is a major component of incremental build times; LLD’s speed is a huge win there, and we care a lot about
 maintaining that speed. I’m CCing Nico, since he’s also been actively benchmarking LLD for Mach-O against Chromium builds (and reporting and fixing speed regressions).<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Reid’s proposals (better error handling and eliminating globals) are completely reasonable. In general though, I really appreciate the LLD codebase’s simplicity and think it’s very valuable for understanding and maintaining the code. I
 haven’t worked too much with the rest of LLVM or Clang, so I’m not at all trying to compare LLD with them or cast aspersions on those codebases; I’m just speaking from my personal perspective. For example, having (mostly) separate codebases for each LLD port
 set off my “code duplication” spidey senses when I first started working with LLD, but while it does lead to some amount of duplication, there’s also a lot of subtle behavior differences between platforms, and having some amount of duplication is IMO a better
 tradeoff than e.g. having common functions that have a bunch of conditionals for each platform, or trying to come up with common abstract interfaces that are specialized for each platform, or so on. I really hope we can maintain that simplicity to whatever
 extent possible.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">Shoaib<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">llvm-dev <<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank" rel="noreferrer">llvm-dev-bounces@lists.llvm.org</a>> on behalf of Jez Ng via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" rel="noreferrer">llvm-dev@lists.llvm.org</a>><br>
<b>Reply-To: </b>Jez Ng <<a href="mailto:jezng@fb.com" target="_blank" rel="noreferrer">jezng@fb.com</a>><br>
<b>Date: </b>Friday, June 11, 2021 at 2:14 PM<br>
<b>To: </b>"<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" rel="noreferrer">llvm-dev@lists.llvm.org</a>" <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" rel="noreferrer">llvm-dev@lists.llvm.org</a>><br>
<b>Subject: </b>Re: [llvm-dev] RFC: Revisiting LLD-as-a-library design<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">As one of the people working on the new Mach-O backend, my main concerns are:<u></u><u></u></span></p>
</div>
<div>
<ol start="1" type="1">
<li class="MsoNormal" style="color:black;background:white">
<span style="font-size:12.0pt">The Mach-O backend is still very much in flux, and will likely remain so until the end of this year. Whoever undertakes this library-fication should sync up with us to avoid e.g. awkward merge conflicts.<u></u><u></u></span></li><li class="MsoNormal" style="color:black;background:white">
<span style="font-size:12.0pt">Performance is very important to us, and this library-fication should not regress it. Right now, we don't have a good benchmarking service set up (the LNT server only benchmarks LLD-ELF); we've been mostly just profiling things
 locally. I can send these benchmarking instructions to whomever takes on this effort.<u></u><u></u></span></li></ol>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">Jez<u></u><u></u></span></p>
</div>
</div>
</div>
</div>

_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" rel="noreferrer">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>