<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2016-01-20 1:11 GMT+02:00 Antoine Pitrou via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, 20 Jan 2016 00:47:56 +0200<br>
<span class="">"Eddy B. via llvm-dev" <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
</span><span class="">> I would love to know your thoughts on this, and more specifically:<br>
> Which of the 3 (byval(T), byval(N) and byval + dereferenceable + align)<br>
> do you think would provide the easiest transition path for front-ends?<br>
<br>
</span>We (llvmlite and Numba) don't use byval specifically but, were we to use<br>
it, I think byval(T) would by far be the easiest for us.  By contrast,<br>
computing ABI sizes is a bit of a PITA due to llvmlite's architecture<br>
(llvmlite's IR generation side doesn't call into LLVM at all, it<br>
generates textual IR in pure Python).<br></blockquote><div>If you have the datalayout string, the ABI sizes become almost trivial to</div><div>compute, the algorithms for structs are simple and I'm not aware of any</div><div>special-cases that would complicate a front-end's computation.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
(as a matter of fact, I plan to keep typed pointers in llvmlite,<br>
because they provide invaluable help discovering bugs early rather than<br>
late - i.e. giving a proper error rather than crashing mysteriously)<br></blockquote><div>I wholeheartedly agree: IMO, all LLVM front-ends should attach their own</div><div>typesystem information to LLVM values instead of passing bare Value*</div><div>around, or the textual equivalent, in your case.</div><div><br></div><div>In rustc we didn't do this from the start and it's become a complete</div><div>nightmare to work with those old parts of the codebase.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Regards<br>
<span class="HOEnZb"><font color="#888888"><br>
Antoine.<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</div></div></blockquote></div><br></div></div>