[LLVMdev] Quick doubt about IR

Shivam Bhagi shivam.bhagi at outlook.com
Wed Dec 4 13:40:48 PST 2013


Hi,

While looking over the IR generated by my source code, I came across the following:

%arr = alloca [30 x i8], align 1

In the source code this particular line of code is represented by:

int arr[30];

I was wondering how I could change the capacity of arr from 30 to any other integral value via a function-pass. I know that 'alloca' can be used for reserving space on stack; further, 'store' can be used for writing to memory. I was wondering how that would work for an array though?

Thanks,
Shivam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131204/a8a357ff/attachment.html>


More information about the llvm-dev mailing list