[LLVMdev] is it possible to get a pointer to a value

�scar Fuentes ofv at wanadoo.es
Thu Jun 20 03:01:39 PDT 2013


edA-qa mort-ora-y <eda-qa at disemia.com> writes:

> Is there a simple way to get a pointer to value? Currently I do an
> alloca and load the value into that space. I wonder if the "intent" is
> lost when I do this and it hurts optimization.
>
> I need a pointer so I can call functions which take a pointer to the value.

A pointer points to memory. If not stored, a value may live in a
register. So you really need the alloca.




More information about the llvm-dev mailing list