Displaying 2 results from an estimated 2 matches for "store_tmp1".
2008 Jun 28
2
[LLVMdev] need to store the address of a variable
..._" + variables.inst[i]->getName();
Value* GEP = new GetElementPtrInst(pointerArray,
ConstantInt::get(Type::Int32Ty, i),
name,
alloca_point);
}
the result of this is:
%minPos_pointerArray = alloca i32*, i32 26 ; <i32**> [#uses=26]
%store_tmp1 = getelementptr i32** %minPos_pointerArray, i32 1 ; <i32**> ...
But I could not find a way to get a pointer to a given variable.
When I translate the following C Code with llvm-gcc
int a;
int* d;
d = &a;
to LLVM I get the following LLVM Code
%a_addr = alloca i32 ; <i32*>...
2008 Jun 28
0
[LLVMdev] need to store the address of a variable
...Value* GEP = new GetElementPtrInst(pointerArray,
> ConstantInt::get(Type::Int32Ty, i),
> name,
> alloca_point);
> }
>
> the result of this is:
>
> %minPos_pointerArray = alloca i32*, i32 26 ; <i32**> [#uses=26]
> %store_tmp1 = getelementptr i32** %minPos_pointerArray, i32 1 ; <i32**> ...
>
> But I could not find a way to get a pointer to a given variable.
>
You probably already know this, but I want to state it just in case.
LLVM has no address-of operator, so if you see an instruction like "...