edA-qa mort-ora-y
2013-Jun-20 03:28 UTC
[LLVMdev] is it possible to get a pointer to a value
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. -- edA-qa mort-ora-y -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Sign: Please digitally sign your emails. Encrypt: I'm also happy to receive encrypted mail. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 261 bytes Desc: OpenPGP digital signature URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130620/0b6ed978/attachment.sig>
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.