<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Sep 25, 2011, at 5:45 PM, David Meyer wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">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></blockquote><div><br></div><div>LLVM IR is brimming with selective IR support.  It's a compiler IR, not an</div><div>actual virtual machine.</div><div> </div><blockquote type="cite"><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>
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></div></blockquote><div><br></div><div>Crashing reliably is better for us than silently miscompiling spuriously, which is what</div><div>the code I reverted was doing.  Reverting it helped us find and fix a few things</div><div>accidentally still using byval on ARM much sooner than we otherwise would</div><div>have.</div></div><div><br></div><div>Dan</div><div><br></div></body></html>