Perhaps mincaml: <a href="https:&#x2F;&#x2F;github.com&#x2F;esumii&#x2F;min-caml" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;esumii&#x2F;min-caml</a><p>It&#x27;s a small (few thousand lines), rather neat, weakly optimising compiler for a subset of OCaml, written in OCaml. It has more than one backend, a few optimisations, a register allocator. No SSA form or &#x27;advanced&#x27; stuff though.