RL4ReAl: Reinforcement Learning for Register Allocation
arXiv:2204.02013 · doi:10.1145/3578360.3580273
Abstract
We aim to automate decades of research and experience in register allocation, leveraging machine learning. We tackle this problem by embedding a multi-agent reinforcement learning algorithm within LLVM, training it with the state of the art techniques. We formalize the constraints that precisely define the problem for a given instruction-set architecture, while ensuring that the generated code preserves semantic correctness. We also develop a gRPC based framework providing a modular and efficient compiler interface for training and inference. Our approach is architecture independent: we show experimental results targeting Intel x86 and ARM AArch64. Our results match or out-perform the heavily tuned, production-grade register allocators of LLVM.
arXiv commentPublished in CC'23
References in corpus (7)
- QT-Opt: Scalable Deep Reinforcement Learning for Vision-Based Robotic Manipulation
- IR2Vec: LLVM IR based Scalable Program Embeddings
- Ithemal: Accurate, Portable and Fast Basic Block Throughput Estimation using Deep Neural Networks
- Coloring Big Graphs with AlphaGoZero
- MLGO: a Machine Learning Guided Compiler Optimizations Framework
- POSET-RL: Phase ordering for Optimizing Size and Execution Time using Reinforcement Learning
- GRANITE: A Graph Neural Network Model for Basic Block Throughput Estimation