Giter VIP home page Giter VIP logo

llvm-pass-skeleton's Introduction

This repo started as the code support for a workshop that we organized at the KTH School of Information and Communication Technology in Stockholm in December 2017.

The purpose of the workshop was to introduce people to the LLVM IR and middle end (the target-independent optimizer). We assumed no previous knowledge about the LLVM IR or the LLVM APIs. We tried to keep it simple and focus on the basic concepts that would allow people to write a pass that understands and transforms the IR. We did not cover complex topics such as pass management internals, def-use chains, using existing analysis passes etc, but we think the materials here are enough to get someone started.

We used a virtual machine for the workshop. You can reproduce that setup by following these instructions.

You can find the tasks for the workshop and an LLVM cheatsheet in the doc directory. You will also find some slides that we have used to explain a few points about LLVM IR as well as the LLVM API.

Most of the (new) material in this repo has been authored by Diana Picus and Roberto Castañeda Lozano.

Special thanks to Adrian Sampson, whose excellent tutorial we have used as a starting point. Note that we have updated the original code to work with LLVM 5.0.

Original README (Adrian Sampson):

llvm-pass-skeleton

A completely useless LLVM pass. It's for LLVM 3.8.

Build:

$ cd llvm-pass-skeleton
$ mkdir build
$ cd build
$ cmake ..
$ make
$ cd ..

Run:

$ clang -Xclang -load -Xclang build/skeleton/libSkeletonPass.* something.c

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.