Comment by petercooper
3 years ago
The 1987 paper about superoptimizers is well worth the read, BTW. It's quite short. Even the first example on its own (writing the sign function without any conditionals) is a mind-bender but becomes straightforward once you see the trick used: https://courses.cs.washington.edu/courses/cse501/15sp/papers...
The cool thing about that paper is compiler implementers immediately added those optimizations to their code generators.
By 'those optimisations' I assume you mean the specific rewrites, not superoptimisation? There has been some interesting recent work in rewrite inference, e.g. ruler. (I recall one such project did a survey and found that many—possibly a majority—of the rewrites it had generated automatically were not present in the hand-written corpuses of gcc and clang. I'm not sure if there was subsequent work to supplement gcc and clang; this was a few years ago now; I think they were looking at gcc 7.)
> I assume you mean the specific rewrites
Of course. The superoptimizer is too slow to use in the compiler itself.
2 replies →
Alexia Massalin's thesis work on Synthesis was also cool.