<div dir="ltr">+1 to the concerns here.<br><div><br></div><div>Not too surprisingly the concerns are from people who actually work on lld [1], who are likely to value hackability. I'd argue that hackability for people working on lld is ultimately beneficial for users of lld too though.</div><div><br></div><div>> I think the important thing is that we've established a direction. If you<br>> review LLD code, consider reviewing and accepting patches that move in this<br>> direction.<br></div><div><br></div><div>I'm not surprised that users of a software packet agree on having the people writing that software do more work. I don't think that necessarily counts as establishing a direction though.</div><div><br></div><div><br></div><div>1: ("1 year" chosen arbitrarily, but doesn't change much with "2 years")</div><div>$ git shortlog -nes lld --since '1 year ago' | head<br>   248  Jez Ng <<a href="mailto:jezng@fb.com">jezng@fb.com</a>><br>   167   Fangrui Song <<a href="mailto:i@maskray.me">i@maskray.me</a>><br>   134     Nico Weber <<a href="mailto:thakis@chromium.org">thakis@chromium.org</a>><br>    69 Sam Clegg <<a href="mailto:sbc@chromium.org">sbc@chromium.org</a>><br>    41        Greg McGary <<a href="mailto:gkm@fb.com">gkm@fb.com</a>><br>    29  Martin Storsjö <<a href="mailto:martin@martin.st">martin@martin.st</a>><br>    26  Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>><br>    22        Vy Nguyen <<a href="mailto:vyng@google.com">vyng@google.com</a>><br>    21  Petr Hosek <<a href="mailto:phosek@google.com">phosek@google.com</a>><br>    20     Georgii Rymar <<a href="mailto:grimar@accesssoftek.com">grimar@accesssoftek.com</a>><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 12, 2021 at 2:55 AM Shoaib Meenai <<a href="mailto:smeenai@fb.com">smeenai@fb.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US" style="overflow-wrap: break-word;">
<div class="gmail-m_1643502025371480755WordSection1">
<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-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12pt;color:black">From: </span></b><span style="font-size:12pt;color:black">llvm-dev <<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">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">llvm-dev@lists.llvm.org</a>><br>
<b>Reply-To: </b>Jez Ng <<a href="mailto:jezng@fb.com" target="_blank">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">llvm-dev@lists.llvm.org</a>" <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">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:12pt;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:12pt">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:12pt">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:12pt;color:black">Jez<u></u><u></u></span></p>
</div>
</div>
</div>
</div>

</blockquote></div>