[LLVMdev] Dynamically allocate and free variables in stack

Semion Prihodko semion.ababo at gmail.com
Fri Aug 26 07:23:24 PDT 2011


Hi, guys.

I have a beginner's question. The virtual machine I develop have
instructions to dynamically allocate variable in stack and to free it
(consistency of such instructions is checked before the actual jitting). To
allocate memory in stack we have alloca IR instruction, but I didn't find
any instruction to free it (such variables will be freed only when an
enclosing function will return). This means that I have to create
function for every stack allocation which is not convenient. Can you suggest
me easier way to dynamically allocate and free variables in stack? Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110826/bed80c1f/attachment.html>


More information about the llvm-dev mailing list