Cameron,<div><br></div><div><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>With regards to your comment that it is inconsiderate to break the tree intentionally, you are forgetting that this was an experimental feature that never worked outside of small test cases. Neither Clang nor llvm-gcc will generate byval on ARM, so it gets no real testing. It might be more considerate to users to just add an assert saying that ARM byval doesn't work.</div>


</div></blockquote><div><br></div><div>I dislike the idea of selective IR support. This creates a hidden (undocumented) contract between the frontends and backends, which limits the IR that is valid. It also treats external producers of bitcode as second-class citizens, since they must effectively mimic Clang or DragonEgg to guarantee that their output will be supported. It is nicer if every backend can handle any valid bitcode (even if doing so is not terribly efficient).</div>
<div><div><br></div><div>In particular, PNaCl's frontends do generate byval for ARM. We actually generate a single bitcode representation to run through several backends (ARM, X86-32 and X86-64).</div><div> </div></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>
I'll let someone else comment on whether we'd rather have a byval that inserts long chains of copies or just disable it entirely. If it is the former, your patch looks fine with the XFAIL of that test removed.</div>

</div></blockquote><div><br></div><div>Struct passing by-value is known to be an inefficient operation. Code demanding performance will usually pass around a const pointer/reference instead if the struct is large. It is a nice performance enhancement to use memcpy, but it doesn't seem too critical. Is there a specific benchmark this affects? In any case, crashing is never the answer !</div>
<div><br></div><div>If there are no more objections, I'll commit, and un-XFAIL the tests which now pass.</div><div>(2011-06-09-TailCallByVal.ll and 2010-11-04-BigByval.ll)</div><div><br></div><div>- pdox</div></div></div>