search for: var_addr

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

Did you mean: bar_addr
2017 Apr 28
3
How to get the address of a global variable in LLVM?
On 28 April 2017 at 14:32, Jonathan Roelofs via llvm-dev <llvm-dev at lists.llvm.org> wrote: > You need a load instruction since your function takes an i32, not an > i32*.... A global's value in llvm is its address, not the numeric data it > contains. I suspect he actually wants to make his function take an "i8*" and bitcast his pointer to that type before calling it.
2017 Jun 10
2
Instruction does not dominate all uses!
...[3 x i32]* %var, i64 0, i64 0 %1 = load i32, i32* %arrayidx, align 4 ret i32 %1 } ===================================================== if (AllocaInst *alloca_inst = dyn_cast<AllocaInst>(&I)) { . . . Value* var_addr = builder.CreateBitCast(alloca_inst, Type::getInt8PtrTy(Ctx)); . . . } ===================================================== I am receiving the following error: Instruction does not dominate all uses! %var = alloca [3 x...