Commit graph

4 commits

Author SHA1 Message Date
bdb2a901ca Add more optimization passes to a test snippet 2025-07-01 13:27:24 +02:00
7aff9db800 Add compiler optimization to get rid of IR-FETCHVARs when unneeded
It replaces the IR-FETCHVAR's result with the variable being
fetched. This only works when the only use is in an operation that
does not require a separate fetch be performed, such as those
implemented as CPU instructions.
2025-07-01 13:25:42 +02:00
b7c4a37483 Make data keep track of their last use 2025-07-01 13:22:24 +02:00
9e643e6c6d Add compiler middle stage
The compiler middle stage takes high level nodes and produces code in
an intermediate representation more closely resembling assembly code.

Optimizations and the tools for making those are also included. It's
significantly easier to optimize IR than syntax trees or assembly.

Several things need cleaning up, in particular there are things in
jigs.lisp that really should be documented tools, not
jigs (specifically the compilation setup and finalization).
2025-06-26 13:41:43 +02:00