Welson Sun
2012-Feb-14 01:08 UTC
[LLVMdev] How to get the array size of GetElementPtrInst->getPointerOperand() ?
If I dump the Value of GetElementPtrInst->getPointerOperand(), I got this: %a = alloca [10 x i32], align 16 Obviously, there should be a way to get the dimension and element type via the "Value" returned from GetElementPtrInst->getPointerOperand(), but how? What kind of "Value" is this? Thanks! Welson -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120213/d0d1d48b/attachment.html>
Welson Sun
2012-Feb-14 03:46 UTC
[LLVMdev] How to get the array size of GetElementPtrInst->getPointerOperand() ?
OK, figured out. The value is an Instruction, the AllocaInst. On Feb 13, 2012 5:08 PM, "Welson Sun" <welson.sun at gmail.com> wrote:> If I dump the Value of GetElementPtrInst->getPointerOperand(), I got this: > > %a = alloca [10 x i32], align 16 > > > Obviously, there should be a way to get the dimension and element type via > the "Value" returned from GetElementPtrInst->getPointerOperand(), but how? > > What kind of "Value" is this? > > > Thanks! > Welson > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120213/1257e950/attachment.html>
Reasonably Related Threads
- [LLVMdev] Wrong AliasAnalysis::getModRefInfo result
- 6 separate instances of static getPointerOperand(). Time to consolidate?
- 6 separate instances of static getPointerOperand(). Time to consolidate?
- [LLVMdev] Wrong AliasAnalysis::getModRefInfo result
- 6 separate instances of static getPointerOperand(). Time to consolidate?