search for: elemptr

Displaying 2 results from an estimated 2 matches for "elemptr".

Did you mean: elem_ptr
2010 Mar 26
1
[LLVMdev] Using GetElementPtr to traverse large arrays
...e million constant index values: intVars = new AllocaInst(Type::getInt32Ty(ctx), allocaSize, "intVars", someBlock); for(int i = 0; i < 1000000; i++) { Value *idx = ConstantInt::get(Type::getInt32Ty(ctx), i); GetElementPtrInst *gep = GetElementPtrInst::Create(intVars, idx, "ElemPtr", someBlock); new StoreInst(idx, gep, entryBlock); //Store some value in it } Apart from the size issue, What is the idiomatic way to traverse small arrays ? The above loop ? I tried to use CreateInBounds but got totally confused.. -- Regards, Gabi http://bugspy.net
2007 Sep 28
2
[LLVMdev] Vector troubles
...opyAndReturn(float* %promoteReturn, float* %toPromote) { Entry: %Promoted_promoteReturn_Ptr = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=2] %Promoted_toPromote_Ptr = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=2] %elemPtr = getelementptr float* %toPromote, i32 0 ; <float*> [#uses=1] %elemLoaded = load float* %elemPtr ; <float> [#uses=1] %vectorPromotion = insertelement <4 x float> undef, float %elemLoaded, i32 0 ; <<4 x float>> [#uses=1]...