Displaying 2 results from an estimated 2 matches for "addrpointer".
Did you mean:
addpointer
2016 Nov 28
2
LLVM Pass for Instructions in Function (error
...lowing lines in my code, where I need to iterate over the instructions in the function (not BB):
for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I){
Instruction *Inst = I;
Instruction *Inst = &*I;
if (Inst -> getOpcode() == Instruction::GetElementPtr){
Value* AddrPointer = Inst->getIperand(0);
....
if (cast<Operator>(Inst) -> getOpcode() == Instruction::GetElementPtr){
Value* AddrPointer = cast<Value>(Inst);
Value* threadId = Inst -> getOperand(1);
unsigned AddrSpace = Inst -> getAddressSpace()
DataStructu...
2016 Nov 28
2
LLVM Pass for Instructions in Function (error
> On Nov 27, 2016, at 6:40 PM, Gurunath Kadam via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Hi Sandeep,
>
> Thanks.
>
> One question about:
>
> Value* AddrPointer = Inst->getIperand(0);
>
> So this works for LVALUE(S) i.e. in my case pointer on LHS of '='. I cannot find anything online about getloperand online.
>
> For reference this is the instruction:
>
> %ptrA = getelementptr float, float addrspace(1)* %A, i32 %id
>
>...