From: Nala Ginrut <nalaginrut@gmail.com>
To: Guile User <guile-user@gnu.org>
Subject: Screaming-Fist: a JIT framework for Guile
Date: Mon, 4 Dec 2023 01:26:24 +0800 [thread overview]
Message-ID: <CAPjoZoe=jeR-QxsQ5XSEK3p2RhyZE8rL2QRJhVy=jiL+zoT-uQ@mail.gmail.com> (raw)
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!
next reply other threads:[~2023-12-03 17:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-03 17:26 Nala Ginrut [this message]
2023-12-03 20:49 ` Screaming-Fist: a JIT framework for Guile Dr. Arne Babenhauserheide
2023-12-05 9:36 ` Nala Ginrut
2023-12-04 21:26 ` Maxime Devos
2023-12-05 10:14 ` Nala Ginrut
2023-12-05 20:30 ` Nala Ginrut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPjoZoe=jeR-QxsQ5XSEK3p2RhyZE8rL2QRJhVy=jiL+zoT-uQ@mail.gmail.com' \
--to=nalaginrut@gmail.com \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).