Writing an LLVM backend
  1. Introduction
  2. Writing a backend
    1. Machine backends
      1. Outline
      2. Implementation details
    2. Language backends
  3. Related reading material

Written by Misha Brukman

Introduction

This document describes techniques for writing backends for LLVM which convert the LLVM representation to machine assembly code or other languages.

Writing a backend
Machine backends
Outline

In general, you want to follow the format of SPARC, X86 or PowerPC (in lib/Target). SPARC is the simplest backend, and is RISC, so if you're working on a RISC target, it is a good one to start with.

To create a static compiler (one that emits text assembly), you need to implement the following:

Implementation details
Language backends

For now, just take a look at lib/Target/CBackend for an example of how the C backend is written.

Related reading material

Valid CSS! Valid HTML 4.01! Misha Brukman
The LLVM Compiler Infrastructure
Last modified: $Date: 2008/02/12 06:05:03 $