[LLVMdev] Question from a passer-by

Eli Friedman eli.friedman at gmail.com
Fri Apr 24 22:26:35 PDT 2009


On Fri, Apr 24, 2009 at 11:04 AM, armencho at gmail.com <armencho at gmail.com> wrote:
> Was wondering what is the real benefit of say translating from LLVM's
> RISC-type instruction set to the x86 which is a more CISC type of
> design?

One benefit of translating to LLVM IR is that it makes optimizations
easier to write and more powerful... you might get a better feel for
it by looking at
http://en.wikipedia.org/wiki/Static_single_assignment_form and some of
the linked articles.  Another benefit is that it can provide be used
for front-ends for many different languages.

> Especially after emitting said RISC stream from a much
> higher-level language like say C or C++?

Despite the fact that X86 is CISC, it's easier to generate optimized
x86 code from a simpler IR... the complexities of x86 and the
complexities of C/C++ are mostly orthogonal.

-Eli



More information about the llvm-dev mailing list