<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 14, 2016 at 1:34 PM, James Knight <span dir="ltr"><<a href="mailto:jyknight@google.com" target="_blank" class="cremed">jyknight@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Seems reasonable.<br>
<br>
I'd note additionally that on some architectures, that the success block *must* be the fallthrough case (that is to say: you must not have any taken branches between the load-linked and store-conditional) in order to have an architectural guarantee that two such loops on different CPUs won't livelock against eachother.<br></blockquote><div><br></div><div>Do we have a way to *require* that 2 blocks be laid out consecutively? I don't think that we do. A hint is better than nothing, but not a guarantee.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
<br>
On Dec 12, 2016, at 12:30 PM, Kyle Butt via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="cremed">llvm-dev@lists.llvm.org</a>> wrote:<br>
> I'm working on a change to the layout algorithm, and I noted that test/CodeGen/ARM/cmpxchg-weak.<wbr>ll was affected.<br>
><br>
> Normally, that would be fine, but I noted that the layout changed the fallthrough from the success case to the failure case. I was surprised to see that the success case isn't annotated with a branch weight by AtomicExpandPass.cpp<br>
><br>
> Would it make sense to annotate the success case as more likely when we expand the intrinsic to help guarantee that the success case remains the fallthrough? Even a 2:1 or 3:2 weighting would correct the layout issue I noted.<br>
><br>
> Thanks,<br>
> Kyle.<br>
</div></div><div class="HOEnZb"><div class="h5">> ______________________________<wbr>_________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" class="cremed">llvm-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank" class="cremed">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br>
<br>
</div></div></blockquote></div><br></div></div>