<div dir="ltr">Thank you very much for replying. Then I have another question:<br>Before I start, I want to choose the best platform to develop my project. Would you please tell what is the best OS platform to develop the llvm project? There are several choices: Mac OS X, FreeBSD, Linux and Windows. <br>
<br>Your opinion is eagerly expected. Thank you :-)<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Message: 7<br>
Date: Wed, 24 Sep 2008 00:44:33 -0700<br>
From: Nick Lewycky <<a href="mailto:nicholas@mxc.ca">nicholas@mxc.ca</a>><br>
Subject: Re: [LLVMdev] What can llvm provide when writing a new<br>
        compiler?<br>
To: LLVM Developers Mailing List <<a href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>><br>
Message-ID: <<a href="mailto:48D9EFE1.3070703@mxc.ca">48D9EFE1.3070703@mxc.ca</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
Cloud Strife wrote:<br>
> Hi everyone.<br>
> Because there is still a little confusion about the huge document, I<br>
> want to know what llvm can provide when we customize our new compiler?<br>
> For example, a normal compiler includes lexer, parser, intermediate code<br>
> generator , optimizer and target code generator. According to llvm<br>
> documents, it seems that llvm can provide a better intermediate code<br>
> presentation. And what else can it provide?<br>
<br>
Optimizer and target codegen. We also provide an IR file format (both<br>
binary and textual). You provide the lexer and parser, and you write the<br>
code that turns your language into LLVM IR.<br>
<br>
Note that the codegen is capable of generating both assembly files on<br>
disk and of JITting. The optimizations are capable of doing<br>
interprocedural optimizations. Someone might want to put these pieces<br>
together in a program that ships some IR, generates some IR on the fly,<br>
and then link-time-optimizes them and JITs the result.<br>
<br>
>    Assuming my new lanuage is very unusual, should I write all the<br>
> parts( lexer, parser, intermediate code generator , optimizer and target<br>
> code generator) by myself? If so, is there any convenient method /<br>
> scheme to do so? Because I heard that the biggest advantage of llvm is<br>
> its flexible and quick-development for new language.<br>
<br>
At some point your language has to become a sequence of operations<br>
executed in order, which can in turn be expressed in LLVM IR. Leave it<br>
to LLVM to perform your optimization and codegen.<br>
<br>
I don't know what document you're referring to, but the LLVM IR is<br>
really quite compact. Do read it: <a href="http://llvm.org/docs/LangRef.html" target="_blank">http://llvm.org/docs/LangRef.html</a> .<br>
<br>
Nick<br>
<br>
>   If anyone knows the answer, would you please give me a reply or<br>
> recommend the chapters which can answer my questions? Thank you very<br>
> much for any help or any advise.<br>
><br>
><br>
><br>
> --<br>
> Best regards.<br>
><br>
><br>
> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
LLVMdev mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br>
<br>
End of LLVMdev Digest, Vol 51, Issue 76<br>
***************************************<br>
</blockquote></div><br><br clear="all"><br>-- <br>Best regards.<br>
</div>