[llvm-dev] result of load Instruction

Vedant Kumar via llvm-dev llvm-dev at lists.llvm.org
Thu Feb 4 14:53:11 PST 2016


Hi,

If you have access to the LoadInst, you can iterate over LI->uses().

See: http://llvm.org/docs/doxygen/html/classllvm_1_1Value.html

best,
vedant

> On Feb 4, 2016, at 9:46 AM, Mohammad Norouzi via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> Hi all,
> 
> How can i find the instruction that uses the result of a load instruction. For example:
> %16 = load i32, i32* %ptr  
> %add = add i32 4, %16
> 
> In this case, i would like to get the add instruction.
> 
> Best,
> Mo
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev



More information about the llvm-dev mailing list