Author Topic: LLVM Framework & Compiler Infrastructure  (Read 3765 times)

0 Members and 1 Guest are viewing this topic.

Offline Marco Pontello

  • Newbie
  • *
  • Posts: 24
  • User-Rate: +5/-5
    • Online TrID file identifier
LLVM Framework & Compiler Infrastructure
« on: October 29, 2007, 01:22:10 PM »
I read about LLVM on ArsTechnica review of Mac OS X Leopard.

Home page: The LLVM Compiler Infrastructure
Google Tech Talks video: YouTube - LLVM 2.0

From the tutorial pages:
Quote
Abstract:

    The Low-Level Virtual Machine (LLVM) is a collection of libraries and tools that make it easy to build compilers, optimizers, Just-In-Time code generators, and many other compiler-related programs. LLVM uses a single, language-independent virtual instruction set both as an offline code representation (to communicate code between compiler phases and to run-time systems) and as the compiler internal representation (to analyze and transform programs). This persistent code representation allows a common set of sophisticated compiler techniques to be applied at compile-time, link-time, install-time, run-time, or "idle-time" (between program runs).

    The strengths of the LLVM infrastructure are its extremely simple design (which makes it easy to understand and use), source-language independence, powerful mid-level optimizer, automated compiler debugging support, extensibility, and its stability and reliability. LLVM is currently being used to host a wide variety of academic research projects and commercial projects. LLVM includes C and C++ front-ends (based on GCC 3.4), a front-end for a Forth-like language (Stacker), a young scheme front-end, and Java support is in development. LLVM can generate code for X86, SparcV9, PowerPC, or it can emit C code.

    This tutorial describes the LLVM virtual instruction set and the high-level design of the LLVM compiler system. To illustrate the ideas in the LLVM IR, we use a running example (by-reference to by-value argument promotion) to illustrate several important API's in the LLVM system. Next, we describe some of the key tools provided by LLVM, and mention several projects that are natural targets for the LLVM system.

Bye!

Offline Theo Gottwald

  • Administrator
  • Hero Member
  • *****
  • Posts: 935
  • User-Rate: +30/-4
    • it-berater
Re: LLVM Framework & Compiler Infrastructure
« Reply #1 on: October 30, 2007, 07:47:06 AM »
Quote
LLVM uses a single, language-independent virtual instruction set both as an offline code representation (to communicate code between compiler phases and to run-time systems) and as the compiler internal representation (to analyze and transform programs). This persistent code representation allows a common set of sophisticated compiler techniques to be applied at compile-time, link-time, install-time, run-time, or "idle-time" (between program runs).

If its a language-independent virtual instruction set as written, will it be a new ".NET" Alternative, targeting CPU independence on future MAC's?

Offline Charles Pegge

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 678
  • User-Rate: +27/-1
    • Charles Pegge
Re: LLVM Framework & Compiler Infrastructure
« Reply #2 on: October 30, 2007, 01:16:20 PM »

This is a layer that would sit below .Net's Common Language Runtime. It is a virtual piece of silicon, which gives it the power, simplicity and flexibility to be used on many platforms and devices, both for static compilation and Just-In-Time compilation.

LLVM is a valuable gift from Apple.