[llvm-dev] How do I dump numerical representation of textual LLVM IR?

Nemanja Ivanovic via llvm-dev llvm-dev at lists.llvm.org
Fri Aug 19 04:13:36 PDT 2016


Oh, I see.

Does llvm-dis correctly reverse what llvm-as did?
Also, does it not help to do something like:
llvm-as -o - -f <IR_file.ll> | xxd

i.e. get the value of each byte in the output file... of course, this
assumes you know what you're looking for in the .bc file (which I don't).

N

On Fri, Aug 19, 2016 at 12:44 PM, Madhur Amilkanthwar <madhur13490 at gmail.com
> wrote:

> llvm-mc will help me for target specific things.
> My question is at IR level and .ll to .bc translation.
>
> To rephrase, how do I verify if llvm-as translates an input LLVM IR
> correctly to .bc representation?
> I'd like to see exact bytes generated by llvm-as.
>
>
> On Fri, Aug 19, 2016 at 2:05 PM, Nemanja Ivanovic <nemanja.i.ibm at gmail.com
> > wrote:
>
>> Perhaps you can run llvm-mc on the instruction in question and provide it
>> the --show-encoding option.
>> Or conversely, you can specify the encoding you desire and run llvm-mc
>> with --disassemble on it.
>>
>> N
>>
>> On Fri, Aug 19, 2016 at 7:52 AM, Madhur Amilkanthwar via llvm-dev <
>> llvm-dev at lists.llvm.org> wrote:
>>
>>> Hi,
>>> For my input file I think that llvm-as is encoding an instruction
>>> incorrectly.
>>> Is there any way to dump the numerical representation of input textual
>>> LLVM IR on terminal?
>>> "-f" option to llvm-as did not help.
>>>
>>> --
>>> *Disclaimer: Views, concerns, thoughts, questions, ideas expressed in
>>> this mail are of my own and my employer has no take in it. *
>>> Thank You.
>>> Madhur D. Amilkanthwar
>>>
>>>
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> llvm-dev at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>>
>>>
>>
>
>
> --
> *Disclaimer: Views, concerns, thoughts, questions, ideas expressed in this
> mail are of my own and my employer has no take in it. *
> Thank You.
> Madhur D. Amilkanthwar
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160819/5ac1e280/attachment-0001.html>


More information about the llvm-dev mailing list