Early Superoptimizer Results
blog.regehr.org
blog.regehr.org
Also, couldn't the same principle apply to compilers that emit LLVM bitcode, like GHC and rustc?
But yes, these results can be made persistent and used directly to optimize code. We are working on it.
Applying this tool to code emitted by GHC or rustc is trivial, it's all LLVM bitcode. One of my ideas is that these languages are a good use case for a superoptimizer since the LLVM passes aren't tuned for them, but we'll have to see how that plays out.
Do you compile the code using clang -O<level> or optimize using opt? I would think that InstCombine would canonicalize that for you so Souper would have less work to do.
Optimize integral reciprocal (udiv 1, x and sdiv 1, x) to not use division: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-...
Optimize signed icmp of -(zext V): http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-...
Optimize -x s< cst: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-...
What's neat is that not all of these end up needing the InstCombine pass to get optimized, some of them can be handled using InstSimplify. InstSimplify isn't a pass, it's an analysis that get's called upon many times in the middle of other passes, strengthening them.
Dr. Massalin is also responsible for "The Synthesis Kernel" [2], a kernel written around the idea of wringing out performance.
Definitely worth a look for speed demon-type programmers like compiler engineers.
[1] http://www.stanford.edu/class/cs343/resources/superoptimizer... [2] https://www.usenix.org/legacy/publications/compsystems/1988/...
Anyone know if there are other cookbook-type "here's how you solve practical problem x with SMT" recipes that might serve as a cargo cult-type (theory-oblivious) dive into SMT?
https://docs.google.com/file/d/0B_8w6H4BG5E_TmxwbkRKRnhUM0k/...
And
http://onlinelibrary.wiley.com/doi/10.1002/spe.2240/abstract