Skip to main content

IR optimizer and lowerer

Project description

pykit

Pykit is a package for a pluggable intermediate representation, that is higher level and easier to use than LLVM. It allows pluggable compiler optimizations and custom opcodes, and aims to abstract over backends (e.g. C or LLVM), IR serialization and caching, debug information. exception handling and potentially GC root finding.

Pykit ships with a builtin set of opcodes, and has an IR verifier and interpreter for that set of operations. The IR is a function of basic blocks containing instructions (operations), similar to three-address code. It supports builtin variables and explicit SSA instructions through the dataflow and reg2mem passes.

Although pykit ships with builtin opcodes and passes, one is entirely free to use a custom set of opcodes, types and transformations.

pykit:

  • lowers and optimizes intermediate code
  • tries to be independent from platform or high-level language
  • can generate LLVM or C89 out of the box
    • todo: finish C codegen :)
  • supports pluggable opcodes
  • has a number of builtin optimizations and transformations
  • has a builtin set of goodies to work with the IR
    • builder, interpreter, verifier
  • supports float and complex math functions through llvmmath

pykit is inspired by VMKit and LLVM.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pykit-0.2.0.tar.gz (257.3 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page