3 ms·
However the Hobbit wasn't a stack machine, it was a memory-to-memory machine with a stack cache. The LLVM uses a register machine with an unlimited number of o
by compressedgas 2y ago
However the Hobbit wasn't a stack machine, it was a memory-to-memory machine with a stack cache.
The LLVM uses a register machine with an unlimited number of once use registers. The Hobbit could easily run LLVM programs with no change to the number of registers used. Compiling as to reuse registers would only decrease the amount of stack memory traffic.
The stack cache is effectively a form of register window. The ISA could have or might have (I don't recall) short form instructions that take shorter offsets from the top of the stack which would be similar in performance to register-to-register operations.
- pclmulqdq 2y agoMost compilers either use an "infinite registers" abstraction or a "no registers" abstraction in the layer that LLVM occupies. It is easy enough to translate from there to "16/32/64 registers."