[llvm-dev] Get the variable size and count from AllocaInst IR instruction

Dipanjan Das via llvm-dev llvm-dev at lists.llvm.org
Fri Jun 9 23:49:01 PDT 2017


Let's say we the following: AllocaInst *alloca_inst =
dyn_cast<AllocaInst>(&I) // I = instruction
Corresponding alloca instructions in IR are as follows:

%var1 = alloca [3 x i32], align 4
%var2 = alloca i32*, align 8

How can I have the size and count (in case of array) of the allocated
variables?

-- 

Thanks & Regards,
Dipanjan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170609/4dbb5804/attachment.html>


More information about the llvm-dev mailing list