<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jan 14, 2014 at 11:08 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com" target="_blank">clattner@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 class="im"><br>
On Dec 19, 2013, at 2:43 PM, Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>> wrote:<br>
<br>
> I searched Transforms/ and Analysis/ for 'ByVal' and updated those call<br>
> sites to check for inalloca if appropriate.<br>
><br>
> I added tests for any change that would allow an optimization to fire on<br>
> inalloca.<br>
<br>
</div>I don't see how this is sufficient.  How do you ensure that optimization passes avoid breaking the invariant you require?</blockquote><div><br></div><div>In practice, it isn't.  With this change and the x86 codegen change, I can self-host a MSVC C++ ABI clang at -O0.  Victory!  =D  With optimizations, various TUs fail the verifier after optimization.  =/</div>
<div><br></div><div>So, this is a start, but I think don't have any clever solutions other than looking for byval and handling inalloca and then reducing all the assertion / verifier failures during a self-host into test cases.</div>
</div><br></div></div>