Cameron,<div><br></div><div>This one small change (AlwaysInline: false -> true) can keep tip-of-tree functional while Dan works on nested call legalization. It will be easy to reverse this change when his fix goes in.</div>
<div><br></div><div>IMHO, it is inconsiderate to break the tree intentionally, especially when a temporary fix is so easy. Even if you XFAIL tests, there will be people who run into the regression in other ways, and may be forced to spend time debugging it.</div>
<div><br></div><div>In addition to my bug, there are two other bugs filed by others which may be related:</div><div><br></div><div><a href="http://llvm.org/bugs/show_bug.cgi?id=10876">http://llvm.org/bugs/show_bug.cgi?id=10876</a></div>
<div><a href="http://llvm.org/bugs/show_bug.cgi?id=10518">http://llvm.org/bugs/show_bug.cgi?id=10518</a></div><div><br></div><div>I've attached a new patch, with a TODO and without a new test.</div><div><br></div><div>
- pdox</div><div><br></div><div><br></div><div><br></div><div>
<br><div class="gmail_quote">On Sun, Sep 25, 2011 at 3:26 PM, Cameron Zwarich <span dir="ltr"><<a href="mailto:zwarich@apple.com" target="_blank">zwarich@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>Dan removed support (temporarily, hopefully) for nested call legalization in r138977 and then XFAIL'd the test test/CodeGen/Generic/2010-11-04-BigByval.ll on ARM in r139058. The latter test hits the same infinite recursion as your test case when compiled for ARM.</div>

<div><br></div><span><font color="#888888"><div>Cameron</div></font></span><div><div><br><div><div>On Sep 25, 2011, at 10:46 AM, David Meyer wrote:</div><br><blockquote type="cite">+Gohman<div><div>
<br></div><div>Cameron,</div><div><br></div><div>A nested callseq is currently an invalid DAG representation, and results in a crash or an infinite loop later in compilation. I don't see how it could ever result in a valid program.</div>


<div><br></div><div>If somebody intends to improve ARM performance by making a nested call to memcpy possible, that is great. But in the meantime, these memcpys really need to be inlined so that the compiler works at all.</div>


<div><br></div><div>- David</div><div><br></div><div><br><div class="gmail_quote">On Sun, Sep 25, 2011 at 3:46 AM, Cameron Zwarich <span dir="ltr"><<a href="mailto:zwarich@apple.com" target="_blank">zwarich@apple.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The fact that the memcpy is not always inlined is an explicit design decision of the ARM byval implementation. Think of the case of copying a gigantic struct.<br>



<br>
The nested legalization of calls it required is unfortunate and has bugs, but I believe Dan Gohman has been cleaning it up a bit.<br>
<br>
Unless I am just really out of the loop (which is possible) this is not the right fix.<br>
<br>
Sent from my iPhone<br>
<div><div><br>
On Sep 25, 2011, at 1:34 AM, David Meyer <<a href="mailto:pdox@google.com" target="_blank">pdox@google.com</a>> wrote:<br>
<br>
> Fixes <a href="http://llvm.org/bugs/show_bug.cgi?id=11004" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=11004</a><br>
><br>
> New test included. Seeking approval to commit.<br>
><br>
> Thanks,<br>
> pdox<br>
</div></div>> <arm_byval.patch><br>
> _______________________________________________<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>
</blockquote></div><br></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>