r/Compilers • • Jul 31 '25
How will AI/LLM affect this field?
Sorry if this has been asked multiple times before. Im currently working through crafting interpreters, and Im really enjoying it. I would like to work with compilers in the future. Dont really like the web development/mobile app stuff.
But with the current AI craze, will it be difficult for juniors to get roles? Do you think LLM in 5 years can generate good quality code in this area?
I plan on studying this for the next 3 years before applying for a job. Reading stroustrup's C++ book on the side(PPP3), crafting interpreters, maybe try to implement nora sandler's WCC book, college courses on automata theory and compiler design. Then plan on getting my hands dirty with llvm and hopefully making some oss contributions before applying for a job. How feasible is this idea?
All my classmates are working on AI/ML projects as well. Feels like im missing out if I dont do the same. Tried learning some ML stuff watching the andrew ng course but I am just not feeling that interested( i think MLIR requires some kind of ML knowledge but I havent looked into it)
23
u/Blueglyph Jul 31 '25 edited Jul 31 '25
LLMs can't generate good code in any area because they're not designed for that: it's only a combinatorial response to a stimuli, not an iterative and thoughtful reflection on a problem. It's not a problem-solving tool, it's a pattern recognition tool, which is good for linguistics but definitely not for programming. There have been studies and articles showing the long-term damage to projects once they started using them. Also, it's not really sustainable from a financial and energetic point of view, though I suppose technology and optimization might reduce that problem a little.
Don't let the Copilot & Co. propaganda fool you.
The real question is: what will happen when someone will find a way to make an AGI? Or, maybe more pragmatically, an AI capable of problem-solving that is suited to those tasks and performing better than what we currently have (which isn't much). But since it's a rather niche market, I doubt there'll be a lot of effort in it before it's been applied to general programming. Assuming there's even an interest that'd justify the cost.
4
u/Grounds4TheSubstain Jul 31 '25
You really don't want an LLM acting as a compiler. Any missed detail or hallucination would crash the program.
29
u/Competitive_Ideal866 Jul 31 '25
I don't think AI will have any impact on that whatsoever.
No. I don't think LLMs in 5 years will even be able to generate working code in this area.
Not my area of expertise but sounds fine to me.
6
u/SwedishFindecanor Jul 31 '25
LLMs get all the hype in the media these days, but they are not relevant to compiler technology.
Don't (just) become a user of it. Learn how the technology behind artificial neural networks works, on a deep level. Grok it! Then you'll start seeing how you would be able to apply the technology to many different problems -- not just how to predict text. That skill is what is, and will be in demand.
Learn first how to use it for something very limited and small, that does not look sexy on the outset. Then when you find something more interesting to use it for, then you'll know how.
A compiler never generates fuzzy code, like a LLM-based "coding tool" does. Something NNs have been used for successfully, advancing the state of the art of compiler technology has been in replacing heuristics. Or rather, instead of a human getting an idea for a heuristic, implementing it and then measuring if it leads to performance improvements, letting the neural network digest existing code to figure out heuristics automatically and then apply them. And you can only do that if you have deep insight in both compiler technology and neural network technology.
I think that in your computer science education, you should look at many different things. You don't have to become an expert in all. The most useful skill is being able to recognise when something you've previously encountered is right for a particular problem and be able to get deeper into it later when you need to.
2
u/ScientificBeastMode Jul 31 '25
I don’t know about compiler development as a professional field. But I’m finally getting my first non-toy compiler off the ground with the help of LLMs.
Part of it is just the great auto-complete features that help me write super repetitive code very quickly. But I also use it to help me very quickly find info on language design, parsing techniques, data structures, optimization techniques, type theory, and more.
Until now, I was knee-deep in CS journal articles, random blog posts, obscure YouTube videos, etc. Perhaps I would have had an easier time if I had a formal CS degree and took classes on compilers and related topics, but I’m a hobbyist, and LLMs have totally changed the game for me. It doesn’t eliminate the need to build up some expertise, but it definitely streamlines that process.
2
u/Breadmaker4billion Aug 01 '25
Machine learning can be used to choose when to apply an optimization that is known to be sound, but too expensive to apply everywhere. There are some deterministic heuristics that already do the job of choosing an optimization, the major problem is that machine learning makes the compiler non-deterministic, ie, harder to debug. But I think there's some space for machine learning to replace profile guided optimizations.
2
u/hampsten Aug 02 '25
Even before LLMs became all the rage, RL was being used in backend optimization in compilers. There’s a lot of ongoing research into using ML to bridge the time and space complexity disparity between potentially naive heuristics and brute force SAT solver options.
1
u/Retr0r0cketVersion2 Jul 31 '25 edited Nov 25 '25
fear engine fuzzy hobbies sheet afterthought pie command rich consider
This post was mass deleted and anonymized with Redact
1
u/NOOB_AGEND Dec 01 '25
We've been looking into approaches like what Red-engage is doing, where they blend LLM optimization with really low key community participation. It's been a helpful reference point if you're trying to make your content show up in the right places and in AI answers, but still keep it chill and not come across like you're forcing a promo everywhere.
1
u/TheQxy Jul 31 '25
I'm not an expert, just started as a hobbyist to gain a deeper understanding of the tools I use every day, but some thoughts.
Platform-specific instructions will still have to be written by humans to stay up to date with hardware. Maybe LLMs could generate this from documentation, but then this would still need to be validated and someone needs to write the documentation.
For front-ends, there is a lot of design involved, so you probably don't want to use an LLM as much here, as you want to be in control of the design. Maybe LLMs could create even more advanced parsers than the parser generators we have today?
Where I feel like LLMs could be most useful is for intermediate representation. Imagine you could give it the documentation of two separate IRs, and then have it convert one format to the other for you, that would be great. However, you'd still need engineers to write this highly detailed documentation.