Alberto Barbaro via llvm-dev
2018-Dec-12 21:57 UTC
[llvm-dev] How to get the destination in a LoadInst
Hi, I would like to get the '5'. I would like to know where the loaded value is stored. I don't know which method I should use of the LoadInst class. Hope this clarifies Thanks On Wed, Dec 12, 2018, 20:37 Doerfert, Johannes Rudolf <jdoerfert at anl.gov wrote:> The LoadInst is %5. I'm not sure what you mean by reference though. > > On 12/12, Alberto Barbaro via llvm-dev wrote: > > Hi all, > > I have %5 = load i32, i32* %3, align 4 LoadInst and I would like to get > > reference to the destination ( in this case %5 ). How can I do that? > > > > Thanks > > > _______________________________________________ > > LLVM Developers mailing list > > llvm-dev at lists.llvm.org > > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > > -- > > Johannes Doerfert > Researcher > > Argonne National Laboratory > Lemont, IL 60439, USA > > jdoerfert at anl.gov >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181212/fcdfba8a/attachment.html>
Florian Hahn via llvm-dev
2018-Dec-12 22:05 UTC
[llvm-dev] How to get the destination in a LoadInst
> On Dec 12, 2018, at 13:57, Alberto Barbaro via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi, > I would like to get the '5'. I would like to know where the loaded value is stored. I don't know which method I should use of the LoadInst class.Take a look at the users of the load instruction: http://llvm.org/docs/ProgrammersManual.html#iterating-over-def-use-use-def-chains Is this what you are looking for? Cheers, Florian
Alberto Barbaro via llvm-dev
2018-Dec-12 22:12 UTC
[llvm-dev] How to get the destination in a LoadInst
Thanks Florian, I'm not sure yet but tomorrow I'll try. At the moment I don't see why I should iterate on a list just for getting the 5 out that LoadInst CTI on but I'm.sure I'm missing something :) Thanks a lot On Wed, Dec 12, 2018, 22:05 Florian Hahn <florian_hahn at apple.com wrote:> > > > On Dec 12, 2018, at 13:57, Alberto Barbaro via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > > > Hi, > > I would like to get the '5'. I would like to know where the loaded value > is stored. I don't know which method I should use of the LoadInst class. > > Take a look at the users of the load instruction: > http://llvm.org/docs/ProgrammersManual.html#iterating-over-def-use-use-def-chains > > Is this what you are looking for? > > Cheers, > Florian >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181212/9afca509/attachment.html>