Tutorial: How To Write An LLVM Register Allocator


My name is Natanael Ramos, I’m a student of bachelor degree on Computer Science Course, here on Brazil.

Recently I have worked with LLVM for my undergraduate thesis (I don’t really know how is called in other countries, here is called Completion of course work), in my work I have implemented an register allocator using LLVM and have tested him with the built-in allocators in LLVM (Probably I’ll publish a paper soon, if all goes as expected).

As another product of my work, I have created a tutorial of how to write an LLVM register allocator, extending the RegAllocBase interface (attached), this tutorial is based on my understanding of the LLVM framework for working with the register allocation pass.

The tutorial have been written in reStructuredText following the LLVM instructions and orientations (http://www.llvm.org/docs/SphinxQuickstartTemplate.html). As suggested, I have already sent the file to the llvm-commits mailing list.

I also want to thank all developers of this mailing list which helped me during the development of my project, making it possible to complete it

Any suggestions, please let me know.

HowToWriteAnLLVMRegisterAllocator.rst (17.1 KB)