Control flow graph based code optimization using graph neural networks

Peker, Melih and Öztürk, Özcan (2026) Control flow graph based code optimization using graph neural networks. Frontiers in Robotics and AI, 13 . ISSN 2296-9144

PDF (Open Access (© 2026 Peker and Ozturk))
Control.pdf
Available under License Creative Commons Attribution.

Download (2MB)

Abstract

Selecting a good set of optimization flags requires extensive effort and expert input. While most of the prior research considers using static, spatial, or dynamic features, some of the latest research directly applied deep neural networks to source code. We combined the static features, spatial features, and deep neural networks by representing source code as graphs and trained Graph Neural Network for automatically finding suitable optimization flags. We created a dataset of 12000 graphs using 256 optimization flag combinations on 47 benchmarks. We trained and tested our model using these benchmarks, and our results show that we can achieve a maximum of 48.6% speed-up compared to the case where all optimization flags are enabled.
Item Type: Article
Additional Information: This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
Uncontrolled Keywords: code optimization; compilers; FLAG; GCC; graph neural networks
Divisions: Faculty of Engineering and Natural Sciences
Depositing User: Özcan Öztürk
Date Deposited: 30 Apr 2026 16:13
Last Modified: 30 Apr 2026 16:13
URI: https://research.sabanciuniv.edu/id/eprint/53958

Actions (login required)

View Item
View Item