<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 18, 2012, at 5:17 PM, Nick Lewycky wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><br><div class="gmail_quote">On 18 January 2012 17:15, Chad Rosier <span dir="ltr"><<a href="mailto:mcrosier@apple.com">mcrosier@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div>Hi Nick,</div><div><br></div>From the test case:<div><br><div><div>;CALL: test1:</div><div>;CALL-NOT: ret</div><div>;CALL: callq helper</div><div>;CALL: ret</div><div><br></div><div>
Shouldn't it be:</div><div>; CALL-NOT: jmp</div></div></div></div></blockquote><div><br></div><div>The call-not is there to ensure that we don't run past the end of the function and match a call from a later test instead. Presumably if we emit a jmp instead of a call, we'll fail to match the "callq helper".</div></div></blockquote><br><div>Sounds good, please commit.</div><br><blockquote type="cite"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><div>Also, we generally put a space between the semi-colon and the first letter of the check prefix (i.e., "; CALL-NOT").</div>
</div></div></div></blockquote><div><br></div><div>Good call, will do!</div><div><br></div><div>Nick</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><div><div>Same comments for test2.</div><div><br></div><div>LGTM, otherwise.</div><div><br></div><div> Chad</div><div><br></div><div><div><div class="h5"><div>On Jan 18, 2012, at 4:02 PM, Nick Lewycky wrote:</div>
<br></div></div><blockquote type="cite"><div><div class="h5"><div class="gmail_quote">On 18 January 2012 15:19, Chad Rosier <span dir="ltr"><<a href="mailto:mcrosier@apple.com" target="_blank">mcrosier@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Nick,<br>
Why not something more like disable-tail-calls? Most of the options begin with verbs such as Enable, Disable, Emit, Trap, etc.<br></blockquote><div><br></div><div>Sounds good, replaced all over. Updated patch attached!</div>
<div><br></div><div>Nick</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Chad<br>
<div><div><br>
On Jan 18, 2012, at 3:10 PM, Nick Lewycky wrote:<br>
<br>
> The attached patch adds a new "-no-tail-calls" flag to llc, and implements it in the x86 backend only. The intent is to support gcc's -fno-optimize-sibling-calls in clang, which as far as I can tell just disables tail calls period. The goal is to help ASAN produce correct stack traces, which requires disabling all tail calls.<br>
><br>
> As an aside, there is a good reason to do this in the backend and not at the IR-level. The "tail" marker is used to indicate things that are useful to the optimizers themselves; for example alias analysis interprets the presence of a tail marker as proof that the callee can't access any alloca's in the caller, whether the pointer has been captured or not.<br>
><br>
> Please review!<br>
><br>
> Nick<br>
><br>
</div></div>> <no-tail-calls-1.patch>_______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br>
</blockquote></div><br>
</div></div><span><no-tail-calls-2.patch></span></blockquote></div><br></div></div></div></blockquote></div><br>
</blockquote></div><br></body></html>