skip to Main Content

I was wondering, is it possible to use Artificial Intelligence to make compilers better?

Things I could imagine if it was possible –

  • More specific error messages
  • Improving compiler optimizations, so the compiler could actually understand what you’re trying to do, and do it better

If it is possible, are there any research projects on this subject?



  1. Are you refering to something like Genetic Programming?

    Login or Signup to reply.
  2. This is indeed a field being researched. Look at the milepost branch for GCC, which relies on profile-guided optimization and machine learning. The recent scientific literature for compilers is full of papers using a combination of data mining, machine learning (through genetic algorithms or neural networks), and more “classical”, pattern-recognition of certain code patterns.

    Login or Signup to reply.
  3. You should look at MILEPOST GCC

    MILEPOST GCC is the first practical attept to build machine learning enabled open-source self-tuning production (and research) compiler that can adapt to any architecture using iterative feedback-directed compilation, machine learning and collective optimizatio

    Login or Signup to reply.
  4. An optimizing compiler is actually a very complex expert system and Expert systems is one of the oldest branches of artificial intelligence.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top