[llvm-dev] type information about instruction

Anastasiya Ruzhanskaya via llvm-dev llvm-dev at lists.llvm.org
Fri Jul 21 08:31:36 PDT 2017


You are totally right:) Silly faults with confusing the instructions. Thank
you again!

2017-07-21 17:03 GMT+02:00 Tim Northover <t.p.northover at gmail.com>:

> On 21 July 2017 at 07:52, Anastasiya Ruzhanskaya
> <anastasiya.ruzhanskaya at frtk.ru> wrote:
> > Thank you for the answer. So, as I understood, to get the type of the
> "or"
> > instruction (which I cannot access further as Value , because it is
> actually
> > a dead instruction), I should get the type of one of its' operands, yes?
>
> The Type of the "or" instruction should be fine without messing around
> with operands, whether it's dead or not.
>
> First, make sure you're looking at the Instruction you think you are
> (sounds obvious, but I'm frequently not) by calling dump: "I->dump()"
> either in the actual C++ or in a debugger. You can also dump the Type
> itself to make sure it's i32. The more sanity checks the better!
>
> Other than that, what function are you using to get the size?
>
> Cheers.
>
> Tim.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170721/2cb603cb/attachment.html>


More information about the llvm-dev mailing list