[LLVMdev] global allocation IR instruction

Nick Lewycky nicholas at mxc.ca
Sun Apr 19 13:59:01 PDT 2015


Tehila Mayzels wrote:
> Hi all,
>
> In order to allocate memory on the stack there is AllocaInst instruction.
>
> What is the similar instruction/way to allocate memory on the global area?

There isn't one. Create a call to malloc, if you're linking against a 
library that supplies malloc.



More information about the llvm-dev mailing list