[LLVMdev] byval attr for base+range parameters

Reid Kleckner rnk at google.com
Thu Jan 23 19:57:59 PST 2014


That is not what byval does.  byval implicitly copies the pointee into the
argument slots used for the call or registers on some architectures.


On Thu, Jan 23, 2014 at 7:42 PM, Yuanfang Chen <cyfmxc at gmail.com> wrote:

> Hello guys,
>
> For single scalar pointer parameter, we have 'byval' to specify the
> pointee is not changed. But for base+range parameters like:
> declare void @_gfortran_transfer_integer_write(%struct.__st_parameter_dt*,
> i8*, i32)
> (This is the fortran runtime api to 'printf' one integer) The 2nd &
> 3rd args are used to specify the memory of that integer. I didn't find
> a comfortable way to specify that it's 'byval'.  I need this to make
> argpromotion work. Right now I just create an alloca, load value into
> it, and specify this alloca(base+range) as parameter.   Is it a
> missing feature or there is a solution already?
>
>
> thanks,
> yuanfang
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140123/86fc5081/attachment.html>


More information about the llvm-dev mailing list