3 ms·
But maybe you can superoptimize some hot sections, and encode the superoptimizer findings somewhere. Then the compiler can validate the optimizations and apply
by alserio 3y ago
But maybe you can superoptimize some hot sections, and encode the superoptimizer findings somewhere.
Then the compiler can validate the optimizations and apply them to the particular piece of code for the rest of the program life, untill the preconditions hold.
- MaxBarraclough 3y agoAs I understand it they just aren't very practical. Perhaps you could use a superoptimizer in a targeted way, assuming that: 1. The codebase has hot loops of very short sequences (or can be automatically reshaped into this patten) 2. The superoptimising compiler can produce code that significantly outperforms the code generated by ordinary optimising compilers 3. A practical superoptimising compiler exists I can imagine these assumptions may not hold in practice. > the compiler can validate the optimizations A compiler transforms code from one representation to another, it doesn't validate arbitrary transformations. It's not easy to prove that a given fragment of source-code corresponds to some given assembly code. I've heard of only one instance of this being done. [0] > untill the preconditions hold I'm not sure what you mean by this. [0] https://entropy2018.sciencesconf.org/data/myreen.pdf https://entropy2018.sciencesconf.org/data/myreen.pdf