Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
(Machine) code generation experiments in Python, roughly centered around LLVM IR
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Type||Name||Latest commit message||Commit time|
|Failed to load latest commit information.|
The ultimate goal of this project is to make it easy to develop a code generation backend in Python for an arbitrary CPU, taking LLVM IR as input. However, the code is currently very far away from that aim, and just contains some hacks towards: 1. Graph-based register allocation. 2. Parsing LLVM IR into Python-native objects, with output support, aiming towards 100% roundtrip. 3. Utilities to transform LLVM encoded as Python objects, for example, converting out of SSA form. These separate features are not 100% complete either, so it may be useful: 1. As a starting base if you wanted to do something similar (I wish I hadn't had to start from scratch myself). 2. As an example for llvmpy (http://llvmpy.org) usage. See also: https://github.com/pfalcon/graph-llvm-ir