As I want to generate code for  the varaible declaration, at first, I thought  AllocInstruction()could implement this.<br>However, the name "alloc" seems to allocate memory from heap memory.and the local variable in function should  stay at stack memory. <br>
In which way did llvm allocate memeory to AllocInstruction() ? Would the memory allocated by AllocInstruction() be recycled back?<br>If not what is the ideal way to locate memory for local varaible in function?<br><br>ps: I've tried <a href="http://llvm.org/demo">llvm.org/demo</a> to watch the IR code, however, it seems to optimize so much to eliminate any intermidate varaible.<br>