search for: idxarr

Displaying 3 results from an estimated 3 matches for "idxarr".

2013 Sep 06
1
[LLVMdev] How to get the exact integer from a Value
Thank you, Chuck! It works. And, please forgive my greed : ), another question: I found that: In IR of llvm which generated by my testing code, there is a Inst said " getelementptr inbounds [5 x i32]* %idxarr, i32 0, i64 3". The idxarr is my array name, and I think Inst means getting the ptr of the 4th (3+1) element of array "idxarr", am I right? So the question is: how can I add this Inst in IR (In other words, is there an API method in IRBuilder or other class to generate "getel...
2013 Sep 06
0
[LLVMdev] How to get the exact integer from a Value
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] > On Behalf Of weixuegong > Subject: [LLVMdev] How to get the exact integer from a Value > I have a Value* type named indexValue, and the type is i32. > I think "indexValue" must hold a number which type is int. Correct, but it might not be a constant. > ConstantInt* CI =
2013 Sep 06
2
[LLVMdev] How to get the exact integer from a Value
Hi,all I have a Value* type named indexValue, and the type is i32. I think "indexValue" must hold a number which type is int. Now I want to use the exact number which pointed by indexValue , so I do like this: ConstantInt* CI = llvm::cast<llvm::ConstantInt>(indexValue); //This is wrong, so is dyn_cast. uint64_t index = indexValue->getZExtValue(); uint64_t size = index + 1; I