<div dir="ltr">Yeah, this really shouldn't be necessary and seems really questionable... I cannot imagine a way that LLVM requires this, and if it LLVM doesn't require this I wonder if we should just move to benchmarking a self-hosted LLD rather than worrying about the very detailed performance characteristics with MSCV-built LLD. This seems like a pretty glaring deficiency in the MSVC inliner that we're papering over.</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 22, 2018 at 9:57 AM David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.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">Is this with a selfhost build? (ie: is clang failing to inline this function where it should) - should we look into why the compiler is failing to catch this case?</div><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Jan 16, 2018 at 12:53 PM Rui Ueyama via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ruiu<br>
Date: Tue Jan 16 12:52:32 2018<br>
New Revision: 322595<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=322595&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=322595&view=rev</a><br>
Log:<br>
Specify inline for isWhitespace in CommandLine.cpp<br>
<br>
Patch by Takuto Ikuta.<br>
<br>
In chromium's component build, there are many directive sections and<br>
commandline parsing takes much time.<br>
This patch is for speed up of lld in RelWithDebInfo build by forcing<br>
inline heavily called isWhitespace function.<br>
<br>
10 times link perf stats of blink_core.dll changed like below.<br>
<br>
master:<br>
TotalSeconds: 9.8764878<br>
TotalSeconds: 10.1455242<br>
TotalSeconds: 10.075279<br>
TotalSeconds: 10.3397347<br>
TotalSeconds: 9.8361665<br>
TotalSeconds: 9.9544441<br>
TotalSeconds: 9.8960686<br>
TotalSeconds: 9.8877865<br>
TotalSeconds: 10.0551879<br>
TotalSeconds: 10.0492254<br>
Avg: 10.01159047<br>
<br>
with this patch:<br>
TotalSeconds: 8.8696762<br>
TotalSeconds: 9.1021585<br>
TotalSeconds: 9.0233893<br>
TotalSeconds: 9.1886175<br>
TotalSeconds: 9.156954<br>
TotalSeconds: 9.0978564<br>
TotalSeconds: 9.1316824<br>
TotalSeconds: 8.8354606<br>
TotalSeconds: 9.2549431<br>
TotalSeconds: 9.4473085<br>
Avg: 9.11080465<br>
<br>
Modified:<br>
    llvm/trunk/lib/Support/CommandLine.cpp<br>
<br>
Modified: llvm/trunk/lib/Support/CommandLine.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CommandLine.cpp?rev=322595&r1=322594&r2=322595&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CommandLine.cpp?rev=322595&r1=322594&r2=322595&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Support/CommandLine.cpp (original)<br>
+++ llvm/trunk/lib/Support/CommandLine.cpp Tue Jan 16 12:52:32 2018<br>
@@ -688,7 +688,7 @@ static bool EatsUnboundedNumberOfValues(<br>
          O->getNumOccurrencesFlag() == cl::OneOrMore;<br>
 }<br>
<br>
-static bool isWhitespace(char C) {<br>
+static inline bool isWhitespace(char C) {<br>
   return C == ' ' || C == '\t' || C == '\r' || C == '\n';<br>
 }<br>
<br>
<br>
<br>
_______________________________________________<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/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div></blockquote></div>