Skip to main content

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.

Website

http://pykit.github.io/pykit/

Documentation

http://pykit.github.io/pykit-doc/

Metadata

Release files for pykit 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pykit 0.2.0
File Size Uploaded
pykit-0.2.0.tar.gz 257.3 kB Details

Release files / pykit-0.2.0.tar.gz

Download URL pykit-0.2.0.tar.gz
Size 257.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6dfe2449ebf0e495fe6d3a1a3bfb0bbe4d8a985192878c8c9da60f8b5f82054b
BLAKE2b-256 checksum
How to use checksums
6c23670dca715bd816333f3321637229de90484cb3c7fa1e870fa185b313aeaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.0 This release

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page