Given the complexity of modern compiler optimizations, integrating a small neural network into a C compiler like GCC might help generate faster executable code by guiding optimization decisions.

My startup is training an AI from scratch to emit x86_64 assembly from plain English prompts - we're skipping the middleman, the long in the tooth, incumbent fatcats.

V2 will be wasm and then everyone will be out of a job. You're welcome.

Yes and no.

Main problem of C optimization, C is not expressive language, and using it tends to quantize problem to tiny chunks, so lost overall picture.

So yes, probably LLVM approach with optimizing already coded something similar to bytecode, could got some speedup, but with using higher level languages, speedup could be magnitudes better.

I think, future belongs to some hybrid approaches, good known domains create, or better word - handcraft with C or even on Assembly, but for less known use something like Prolog solver.

-O3 -march=native is pretty much all you need and the rest is marginal or circumstantial.

What makes you so confident that an AI-assisted compiler couldn't significantly enhance optimizations? A relevant example of a complex problem where neural networks have improved performance is found in chess engines. Today, top-level engines like Stockfish have integrated NNUE ("Efficiently Updatable Neural Network") which has significantly boosted their performance.

What makes me confident is the fact that I've been using gcc since 2.95 (well redhat had its patched "2.96" but yeah) so I witnessed the evolution of these parameters.

What makes neural networks and learning irrelevant is because there aren't a billion parameters, most parameters don't depend on each other. It is not a search problem. You have the wrong domain.

This is like saying "hey let's crack that password using neural networks, stockfish is so advanced!"

And people have tried auto searching parameters, the results were as I described in my response. Moreover, imagine releasing code and having cluebies complain about trying to make it go faster with -fomit-frame-pointer. The whole idea is wasteful and cringe.

That doesn't fix suboptimal algorithm choices, but neither would a small NN in the compiler. A big NN could rewrite large sections of code without changing the logic, but why do that during translation instead of rewriting the source?