Interference Graph Dataset for Machine Learning-Based Register Allocation

Pedro Zaffalon da Silva, Helen C. de Mattos Senefonte, Wesley Attrot · IEEE Access · 2024

Register allocation is an important phase in compiler optimization. Often, its resolution involves graph coloring, which is an NP-complete problem. Because of their significance, numerous heuristics have been proposed for their resolution. Heuristic development is a complex process that requires specialized domain expertise. Recently, several machine learning based approaches have been proposed to solve compiler optimization problems. Nevertheless, owing to the complexity of the problem and the lack of specialized datasets for training models applied to register allocation, few works on the topic have been produced. The deficiency in sufficient adequate test cases is a recurring issue when working with register allocation, even beyond the scope of machine learning applications. In an effort to address this problem and facilitate forthcoming research in this domain, this work presents the development of a simple code interference graph generator, and as far as we know, the first dataset for training machine learning models focused on register allocation. The dataset consists of PBQP interference graphs from real C/C++ codes, and it is easily adaptable to various register allocation techniques. Our dataset primary goal is to represent codes and potential spill costs accurately as graphs to enable machine learning algorithms to develop effective new register allocation approaches, however it can also assist in the development and improvement of more traditional register allocation techniques.

Read the paper · More papers on PaperTik