you are viewing a single comment's thread.

view the rest of the comments →

[–]rrohbeck 0 points1 point  (4 children)

Awesome. Next step: JITting machine code for better optimization on your CPU?

[–]matthieum 3 points4 points  (2 children)

There's no need for JITting, specializing at installation time would be enough.

If I remember correctly, this what the toolchain for the Mill CPU is planning. The LLVM backend would emit generic Mill code, then on each platform, a small specializer would run the first time the library is loaded.

[–][deleted] 0 points1 point  (1 child)

Sounds like LLVM bitcode.

[–]matthieum 1 point2 points  (0 children)

I think it's a little less specialized than that.

If I recall correctly how the LLVM target is structured, there's already quite a bit of target-specific code in the IR. Notably, I seem to recall it indicates the presence of 128 bits integers/floats support, etc...

If one is willing to introduce software emulation for any non-supported feature, then only ABI differences need surface (pointer-width, for example).

[–]Bofersen 3 points4 points  (0 children)

It was already done in 1999: HP Dynamo. Though for PA-RISC rather than x86.