3 ms·
Seems the ideal would be to have a HIR/MIR divide, specifying the HIR instructions in their MIR, then having the interpreter compile it's instruction from the M
by __s 9y ago
Seems the ideal would be to have a HIR/MIR divide, specifying the HIR instructions in their MIR, then having the interpreter compile it's instruction from the MIR to get the specialized opcodes to dispatch the HIR directly, but then have a JIT expand hot code to the MIR for compilation where it can use the MIR to do optimization within HIR instructions
- sctb 9y agoIf I'm understanding your terminology, Guile already has a kind of CPS as its mid-level intermediate form: https://wingolog.org/archives/2015/07/27/cps-soup https://wingolog.org/archives/2015/07/27/cps-soup. There's a long history of Lisp languages using a “MIR” of sorts, typically CPS, SSA, or ANF.
- __s 9y agoI'm using HIR to refer to instructions like bv-f32-ref while MIR to refer to instructions which are introduced to "explode" that instruction By having both, rather than choosing between the two as is discussed in the blog, one can have the decision be more akin to a compiler's inlining heuristics