[LLVMdev] Little Problem about Variable memory allocating way in function
Jianfei Hu
hujianfei258 at gmail.com
Sat Apr 21 09:18:55 PDT 2012
As I want to generate code for the varaible declaration, at first, I
thought AllocInstruction()could implement this.
However, the name "alloc" seems to allocate memory from heap memory.and the
local variable in function should stay at stack memory.
In which way did llvm allocate memeory to AllocInstruction() ? Would the
memory allocated by AllocInstruction() be recycled back?
If not what is the ideal way to locate memory for local varaible in
function?
ps: I've tried llvm.org/demo to watch the IR code, however, it seems to
optimize so much to eliminate any intermidate varaible.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120422/218e8c1f/attachment.html>
More information about the llvm-dev
mailing list