4 ms·
I think you don't understand the goals Hal has, and lays out pretty explicitly in the paper (https://arxiv.org/pdf/1904.08555.pdf https://arxiv.org/pdf/1904.085
by DannyBee 7y ago
I think you don't understand the goals Hal has, and lays out pretty explicitly in the paper (https://arxiv.org/pdf/1904.08555.pdf https://arxiv.org/pdf/1904.08555.pdf):
1. Be able to replace very complex template dispatch mechanisms with simple JIT ones.
Your suggestion is not possible, because you can't compile it once (maybe you can compile it a ton of times though!)
That is, unless someone has implemented a very very ridiculous set of dynamic detection and dispatch mechanisms, and your compiler supports changing microarchitecture/etc optimization
per function or you split it out/ifdef it and compile the same file 5000 ways.
Even then, you will likely miss something the JIT will not, and you will be unable to support new architectures/microarchitectures without recompiling.
2. Be able to JIT things without changes to application source code.
3, Be able to easily integrate things like CUDA into the JIT model.
(FWIW: Hal is a very long time and well respected LLVM contributor, so he generally wouldn't suggest something trivially stupid :P)