[LLVMdev] Could LLVM help me?

Tanya Lattner tonic at nondot.org
Mon Dec 27 10:37:59 PST 2004

> You are the only one who response my problem. The others maybe don't
> understand my questions....:(

I'm also replying to the list. People are very nice and helpful! Plus, I 
am on vacation! :)

> well....my questions are following.
> 1. I wrote a very simple backend, but I dont know how to tell the llvm
> compiler to use it.
>    I found something in "llc --help", it says that I can use
> -march=BACKEND. But it only
>    can use X86, sparcev9 and powerpc. The skeleton looks like for
> custom use, but I dnot
>    know how to use it??

You need to use -load or link it in statically to the llc executable. If 
you have done this you should see your backend option with -help.

> 2.  I dont know how to generate the "machine code", which I mean is
> the code looks like "01001110101010100010....". All I got was the
> "assembly code", not machine code.

Usually you use a system assembler to do this. The other way to do it is 
to implement the JIT code emitter interface.

> Above just a part of my questions, thx for your help!!!

You're welcome!


> Dave win.
> On Sun, 26 Dec 2004 22:46:58 -0600 (CST), Tanya Lattner
> <tonic at nondot.org> wrote:
>>>        I have tons of questions about the LLVM backend, could U give me hand??
>> Maybe :) Its actually best to email the llvmdev at cs.uiuc.edu mailing list
>> since there are tons of people on it. You will get a much faster response.
>> -Tanya
>>> Dave Win.
>>> MSN: s8540049 at hotmail.com
>>> On Wed, 1 Dec 2004 11:17:07 -0600 (CST), Tanya Lattner <tonic at nondot.org> wrote:
>>>>>     I'm a newbie of LLVM. I want to make sure that my way is correct.
>>>>> Plz tell me...
>>>>> we design a new processor with a new arch. we wanna get a compiler as
>>>>> fast as possible. The target code of the new compiler  is machine
>>>>> code.
>>>>>  So, is it I just to create a whole new backend for our new processor,
>>>>> right? And then????
>>>> Yes. LLVM would be great for your project. Please check out the document
>>>> on how to write a backend.
>>>> http://llvm.cs.uiuc.edu/docs/WritingAnLLVMBackend.html
>>>> -Tanya

More information about the llvm-dev mailing list