Getting the address of an Operand from LLVM IR

Hello There,

Is it possible to retrieve the memory address of an operand in LLVM IR.
If so, How to do it.

I know that we cannot determine the absolute address . Can we can at least retrieve the relative address of a variable/operand in an instruction.

Thank You in advance.



LLVM IR is too high level to give that kind of information. Stack frames haven’t been created yet and we’re a million miles from generating relocations. There’s no guarantee that a pointer type in LLVM IR actually becomes a pointer when instruction selected!