[llvm-dev] How to get the destination in a LoadInst
Evgenii Stepanov via llvm-dev
llvm-dev at lists.llvm.org
Wed Dec 12 14:26:05 PST 2018
On Wed, Dec 12, 2018 at 2:13 PM Alberto Barbaro via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
>
> 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 :)
In LLVM an instruction and its result are the same thing. Instruction
is a subclass of Value. LoadInst is %5.
>
> 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
>
> _______________________________________________
> 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