[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Screaming-Fist: a JIT framework for Guile
From: |
Nala Ginrut |
Subject: |
Screaming-Fist: a JIT framework for Guile |
Date: |
Mon, 4 Dec 2023 01:26:24 +0800 |
Hi Folks!
I'd like to introduce our new project named screaming-fist which is a JIT
framework based on libgccjit.
The project is still preliminary, but the POC could run.
The basic idea is to hide the JIT details and let users write Scheme-like
code for JIT on the fly.
here's the simple code:
--------------------------------
(import (screaming-fist jit))
(jit-define (square x)
(:anno: (int) -> int)
(* x x))
(square 5)
;; ==> 25
----------------------------------
And you can dump IR, say, gimple:
----------------------------------------------
(import (screaming-fist utils) (screaming-fist jit))
(parameterize ((dump-mode "gimple"))
(jit-define (square x)
(:anno: (int) -> int)
(* x x)))
-------------------------------
The possible output could be:
------------------------------
int square (int x){
int D.79;
<D.76>:
D.79 = x * x;
return D.79;}
--------------------------------------------
The branching and looping codegen is still under debugging.
Here's the project page:
https://gitlab.com/SymeCloud/screaming-fist
Happy hacking!
- Screaming-Fist: a JIT framework for Guile,
Nala Ginrut <=