GCC has some support for macro-ops fusion. [0] is the first message in a gcc-patches thread where the feature was added.
[0] https://gcc.gnu.org/ml/gcc-patches/2013-09/msg00168.html
[0] https://github.com/llvm-mirror/llvm/blob/master/lib/Target/X...
From someone completely naive on the compiler scene, I think I can safely say that
- A benchmark with better results than it should have (ie, savings on the order of whole seconds) would obviously grab and keep attention
- For finding out who to pester and/or what everyone thinks of the subject, #gcc is big-ish, #llvm is a bit smaller, and #clang is smaller still, all on freenode - presumably low activity (as seems the norm nowadays) and type-and-wait, but a lighter-weight (for want of a better term) alternative than the mailinglists. Ultimately I expect you'll end up posting to a list somewhere, but IRC sounds like a good way to get oriented first
- My strong guess is that LLVM and GCC already have fairly heavily ingrained internal architecture/structure, and yeah, some convincing would be needed.
- I have no idea how to get in touch with people associated with LKML off-LKML, but they seem to have opinions about generated code quality too: https://lkml.org/lkml/2017/11/10/310 (focusing on reply at bottom, not quote; linked in https://news.ycombinator.com/item?id=15849305, from https://news.ycombinator.com/item?id=15845118)
We actually have done optimal modeling before, using distributed combinatorial optimization.
FWIW Intel documentation is often wrong, so you'd need a real motivating benchmark.
But one optimization I'd like to see is convincing the compilers to do better on "macro-op fusion", which let "INC/JCC" type operations be treated as a single µop if they are one after the other. GCC/Clang don't seem to be aware of the benefit of this, and often gratuitously break it by splitting them up.
It's a reasonably rare case where it makes a big difference, but it almost never hurts, and frequently is a small positive. Who would I need to convince to change this? What sort of benchmark would they need as motivation? Would pointing to Intel documentation possibly be sufficient?