Giter Site home page Giter Site logo

enna1 / llvm-clang-examples Goto Github PK

View Code? Open in Web Editor NEW
38.0 3.0 3.0 7.1 MB

A collection of code based on LLVM/Clang compilation libraries and tools

License: GNU General Public License v3.0

C++ 63.00% CMake 2.93% C 17.90% Makefile 0.05% Shell 1.54% LLVM 1.08% Brainfuck 13.51%
clang llvm llvm-tutorial program-analysis llvm-pass

llvm-clang-examples's Introduction

LLVM-Clang-Examples

A collection of code based on LLVM/Clang compilation libraries and tools.

There are also some useful tutorials about LLVM/clang in directory tutorials/.

To install llvm, you can use the installer script install-llvm-5.0.1.sh that can be found in directory utils/.

E.g. use $ ./install-llvm-5.0.1.sh 4 ~/ to build llvm-5.0.1 using 4 cores in your home directory.

Contents

Tutorials

Custom class supporting LLVM RTTI

Sample code used to demonstrate how to set up LLVM-Style RTTI for your custom class hierarchy.

For detail, see https://github.com/Enna1/LLVM-Clang-Examples/tree/master/custom-class-support-llvm-rtti

C AST Interpreter

A basic tiny C language interpreter based on Clang.

For detail, see https://github.com/Enna1/LLVM-Clang-Examples/tree/master/c-ast-interpreter

Comments Extractor

A simple tool based on clang's libtooling to grab all the comments from C source code.

For detail, see https://github.com/Enna1/LLVM-Clang-Examples/tree/master/comments-extractor

Dataflow Points-to Analysis

An LLVM pass that implements a flow-sensitive, field- and context-insensitive points-to analysis via dataflow, computing the points-to set for each variable at each distinct program point.

For detail, see https://github.com/Enna1/LLVM-Clang-Examples/tree/master/dataflow-points-to-analysis

Use CalledValuePropagationPass in your tool

Sample code used to demonstrate how to call CalledValuePropagationPass in your own tool based LLVM.

For detail, see https://github.com/Enna1/LLVM-Clang-Examples/tree/master/use-calledvaluepropagation-in-your-tool

Break ConstantExpr

This BreakConstantExpr is a module pass that converts all constant expressions into instructions.

For detail, see https://github.com/Enna1/LLVM-Clang-Examples/tree/master/break-constantexpr

Unify Function Exits

This UnifyFunctionExits module pass is just a wrapper for UnifyFunctionExitNodes function pass, used to ensure that functions have at most one return instruction in them.

For detail, see https://github.com/Enna1/LLVM-Clang-Examples/tree/master/unify-functionexits

Run an LLVM Pass with Clang

Sample code used to demonstrate how to run your LLVM Pass with Clang.

For detail, see https://github.com/Enna1/LLVM-Clang-Examples/tree/master/clang-pass

JIT for brainfuck

A JIT using LLVM for brainfuck language.

For detail, see https://github.com/Enna1/LLVM-Clang-Examples/tree/master/building-a-JIT-for-BF

Taint Propagation

An LLVM transform pass implements a flow-sensitive, field- and context-insensitive taint propagation based on classic dataflow analysis.

For detail, see https://github.com/Enna1/LLVM-Clang-Examples/tree/master/taint-propagation

llvm-clang-examples's People

Contributors

enna1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.