Enhancing GCC Compiler Optimization Through Natural Language Processing-Driven Automation

Anirudh. S, C. R. Kavitha · 2024

Compiler optimization is crucial, for enhancing program performance. However manually choosing the optimization flags can be quite challenging for developers. This paper introduces an approach that uses Natural Language Processing (NLP) to automate the selection of GCC optimization flags based on user commands. By converting natural language inputs into compiler flags the system simplifies the optimization process and makes it more accessible to a broader audience of developers. The method involves phases starting from preparing a relevant dataset then training machine learning models and ultimately integrating these models with the GCC compiler. The results from experiments show that this approach significantly enhances both compilation efficiency and overall code performance. These results illustrate how effectively the system aligns developers intentions with what the compiler can achieve making the optimization process more intuitive and effective. This research not only streamlines compiler optimization but also paves the way for enhancing the usability of compiler tools, in future advancements.

Read the paper · More papers on PaperTik