Coder Social home page Coder Social logo

llvm-practive's Introduction

LLVM_Practice

Environment set up

Need to install:

  1. LLVM 15 (build from source or prebuilt distribution)
  2. GDB
  3. LLVM Lit
  4. Cmake
  5. Google test

HelloWorld Pass

The first pass that simply prints function names of a module. Mainly for verifying the build and debug system of future passes.

HelloWorld builds a pass as dll/so shared library that does NOT link any LLVM library. Thus it's a standalone pass not within LLVM build system. We could call opt and load that shared library to run the pass on any LLVM IR code. Also a gdb target is generated support debugging the pass in the shared library. This pass and its build system is the base of future passes.

Dominance Analysis (WIP)

A function analysis that compute the dominator information. Dominator info is used extensively in compiler optimization. The unittest system is implemented in this analysis to check the correctness of the analysis.

DominanceAnalysis builds a pass as shared library that invokes an analysis. The analysis library contains:

  1. implementation of the Simple Fast Dominator Algorithm and the Lengauer-Tarjan Algorithm (WIP).
  2. implementation of a dominator tree that can retrieve dominance information efficiently.
  3. a gtest suit that checks the correctness of the implementation of the analysis.

Sparse Conditional Constant Propagation

A optimization pass that do some sort of const propagation and dead code elimination together. It's a good practice of writing a dataflow analysis.

llvm-practive's People

Contributors

hd650 avatar

Watchers

 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.