Yet another Python Compiler -------- Original Message -------- Subject: [LLVMdev] Pyston: a Python JIT on LLVM Date: Thu, 3 Apr 2014 11:10:39 -0700 From: Kevin Modzelewski <kmod@xxxxxxxxxxx> To: Dev <llvmdev@xxxxxxxxxxx> Hi all,I've been lurking on the list for a bit, and I'm excited to finally talk about what I'm working on: Pyston, a JIT for Python <https://tech.dropbox.com/2014/04/introducing-pyston-an-upcoming-jit-based-python-implementation/>. It's still extremely early on, but I'm happy that I can open source the code <https://github.com/dropbox/pyston> for viewing and discussion.
It contains experimental but working implementations of a few things that I thought might be interesting to the community; they are certainly not production-quality implementations, but I hope they can be at least a data point for people interested in the functionality: - It contains a working cross-module inliner <https://github.com/dropbox/pyston/blob/master/src/codegen/opt/inliner.cpp>, which can be necessary for doing inlining with MCJIT. - It has a build system that allows compiling a runtime file both into the JIT itself, as well as into the stdlib bitcode file for inlining into JIT'd code. - It contains a working inline cache system that uses the llvm.experimental.patchpoint() intrinsic. It also has some new support for using the PreserveAll calling convention so that the inline cache fastpaths can often avoid spilling registers. - It has a few optimization passes that are optimized for Pyston, but could be applicable to other dynamic languages; in particular it has an escape analysis for GC'd memory <https://github.com/dropbox/pyston/blob/master/src/codegen/opt/escape_analysis.cpp> that helps lower GC'd memory to registers if the variable is local (something that is probably rare in static languages, but very common in Python). - Some perf debugging tools, ex for getting instruction-level profiles of JIT'd code.
There's still a very, very long way to go for Pyston, but it couldn't have even started without LLVM, so I hope I can give something back!
_______________________________________________ LLVM Developers mailing list LLVMdev@xxxxxxxxxxx http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev