<div dir="ltr">On 20 August 2013 16:39, Timon Gehr <span dir="ltr"><<a href="mailto:timon.gehr@gmx.ch" target="_blank">timon.gehr@gmx.ch</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 08/20/2013 02:18 AM, Andrei Alexandrescu wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Why would it be necessary to return an object of type TypeTuple (i.e.<br>
template tuple)?<br>
</blockquote>
</div><br>
- ABI<br>
<br>
Multiple return values could use a more efficient ABI than struct instances because they do not have an address.<br></blockquote><div><br></div><div>*** this</div><div><br></div><div>I've been banging this drum for years!</div>
<div><br></div><div>However this discussion resolves, I just hope it allows for convenient and efficient MRV's.</div><div>Obviously it should be syntactically convenient, and assignment of MRV to callee locals should be convenient too.</div>
<div>But more importantly, I'd like to see ALL the argument registers re-used to return multiple values, rather than just the first one. They're just sitting there begging to be used, and in many cases, would lead to some great efficiency improvements across function calls/returns. Especially on non-x86 architectures.</div>
<div><br></div><div>Perhaps one of the most common causes for (otherwise unnecessary) inlining of functions is because of the terrible legacy ABI for returning multiple values from functions.</div></div></div></div>