[LLVMdev] byval attr for base+range parameters

Yuanfang Chen cyfmxc at gmail.com
Thu Jan 23 19:42:15 PST 2014

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?


More information about the llvm-dev mailing list