<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Thu, Jan 4, 2018 at 1:05 PM Stephen Checkoway via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@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"><br>
On Jan 4, 2018, at 11:52, Chandler Carruth via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
<br>
> On Thu, Jan 4, 2018 at 12:31 PM Stephen Checkoway via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
>> As I understand it, the busy loop is to cause the speculative execution to be trapped in the loop. Was something like ud2 considered? I presume that would stop the speculative execution without involving any of the execution units the way the busy loop does.<br>
>><br>
> The pause instruction will also avoid tying up execution resources in speculative contexts, so I wouldn't expect it to be significantly different.<br>
<br>
Got it. The Software Developer Manual isn't entirely clear on this point (to me at least) and IACA shows a number of ports in use during the 4 or 5 Uops pause takes.<br></blockquote><div><br></div><div>That's if it executes. But pause doesn't get speculatively executed at all.</div><div><br></div><div>Sadly, this makes IACA and other tools challenging to use. Instead you want to construct a tight careful benchmark, control frequency and everything else, and look at exact retire rates of instructions etc.</div><div><br></div><div>But if you find instruction sequences that reliably benchmark as faster, please share this on the review thread. =D</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thank you,<br>
<br>
Steve<br>
<br>
--<br>
Stephen Checkoway<br>
<br>
<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>