LLVM Compiler Katie Dew. Lectures High-level overview of LLVM (Katie) Walkthrough of LLVM in context...

10
LLVM Compiler Katie Dew

Transcript of LLVM Compiler Katie Dew. Lectures High-level overview of LLVM (Katie) Walkthrough of LLVM in context...

Page 1: LLVM Compiler Katie Dew. Lectures High-level overview of LLVM (Katie) Walkthrough of LLVM in context of our project (Jason) –Input requirements –Configuration.

LLVM Compiler

Katie Dew

Page 2: LLVM Compiler Katie Dew. Lectures High-level overview of LLVM (Katie) Walkthrough of LLVM in context of our project (Jason) –Input requirements –Configuration.

Lectures

• High-level overview of LLVM (Katie)

• Walkthrough of LLVM in context of our project (Jason)

– Input requirements

– Configuration needs

• Additional configuration and global context (Dave)

– Optimizations

– Other file formats

2

Page 3: LLVM Compiler Katie Dew. Lectures High-level overview of LLVM (Katie) Walkthrough of LLVM in context of our project (Jason) –Input requirements –Configuration.

Overview

• High level overview of toolchain

• Sub-projects, libraries

• Advantages

• Audience

• Features

• Basic commands

3

Page 4: LLVM Compiler Katie Dew. Lectures High-level overview of LLVM (Katie) Walkthrough of LLVM in context of our project (Jason) –Input requirements –Configuration.

What is LLVM?

• Research project at the University of Illinois in 2000– Goal: build a dynamic compiler for static and

dynamic programming languages• Set of modular and reusable compiler and

toolchain technologies• http://llvm.org/

4

Page 5: LLVM Compiler Katie Dew. Lectures High-level overview of LLVM (Katie) Walkthrough of LLVM in context of our project (Jason) –Input requirements –Configuration.

Sub-Projects of LLVM

• LLVM Core Libraries– http://llvm.org/docs/

• Clang

• libc++

5

Page 6: LLVM Compiler Katie Dew. Lectures High-level overview of LLVM (Katie) Walkthrough of LLVM in context of our project (Jason) –Input requirements –Configuration.

Why Use LLVM?

• Low-level language with strictly defined semantics

• Front-ends for C and C++

• Garbage collection

• Documentation and projects– http://llvm.org/ProjectsWithLLVM/

• Tools to make development easier– Bugpoint tool

– http://llvm.org/docs/Bugpoint.html

6

Page 7: LLVM Compiler Katie Dew. Lectures High-level overview of LLVM (Katie) Walkthrough of LLVM in context of our project (Jason) –Input requirements –Configuration.

Who is LLVM For?

• Developers

• Researchers

• End-users

7

Page 8: LLVM Compiler Katie Dew. Lectures High-level overview of LLVM (Katie) Walkthrough of LLVM in context of our project (Jason) –Input requirements –Configuration.

Features

• Front-ends for C, C++, Objective-C, and Fortran

• Stable implementation of LLVM instruction set

• Easy retargettable code generator which supports

– X86, X86-64, PowerPC, PowerPC-64, ARM, Thumb, SPARC, Alpha, CellSPU, MIPS, MSP430, SystemZ, Xcore

• Just-In-Time (JIT) code generation system

• http://llvm.org/Features.html

8

Page 9: LLVM Compiler Katie Dew. Lectures High-level overview of LLVM (Katie) Walkthrough of LLVM in context of our project (Jason) –Input requirements –Configuration.

Basic Commands

• llvm-as

• llvm-dis

• opt

• llc

• lli

• llvm-link

• llvm-ar

• http://llvm.org/docs/CommandGuide/

9

Page 10: LLVM Compiler Katie Dew. Lectures High-level overview of LLVM (Katie) Walkthrough of LLVM in context of our project (Jason) –Input requirements –Configuration.

Questions?

10