<div dir="ltr">That is not what byval does. byval implicitly copies the pointee into the argument slots used for the call or registers on some architectures.</div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Jan 23, 2014 at 7:42 PM, Yuanfang Chen <span dir="ltr"><<a href="mailto:cyfmxc@gmail.com" target="_blank">cyfmxc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello guys,<br>
<br>
For single scalar pointer parameter, we have 'byval' to specify the<br>
pointee is not changed. But for base+range parameters like:<br>
declare void @_gfortran_transfer_integer_write(%struct.__st_parameter_dt*,<br>
i8*, i32)<br>
(This is the fortran runtime api to 'printf' one integer) The 2nd &<br>
3rd args are used to specify the memory of that integer. I didn't find<br>
a comfortable way to specify that it's 'byval'. I need this to make<br>
argpromotion work. Right now I just create an alloca, load value into<br>
it, and specify this alloca(base+range) as parameter. Is it a<br>
missing feature or there is a solution already?<br>
<br>
<br>
thanks,<br>
yuanfang<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br></div>