Implementing a Registrar in LLVM

I am working on my project to complete my undergraduate course which consists of experimental analysis of register allocation algorithms. For this task, I am using a toolbox from the LLVM project.

However, I have read the LLVM project documentation and have not yet found a way to put the puzzle pieces together. So far I know:

  • How is the work on attracting them to LLVM and know that I have to implement MachineFunctionPass pass .
  • I am following some advice to look at Basic Allocator but couldn't figure out a lot.

The allocator I intend to implement is based on the graph coloring heuristic, as the theory of how such methods work well knows.

So what I'm looking for is a kind of "How", a specific set of steps to implement such an allocator. It sounds like a carelessness, but I have to get this job done in about six months and I'm a little confused.

If anyone can give me any guidance or link to any supporting material (besides their own documentation) I would appreciate it.

My English may be a little wrong, I am a Brazilian student.

+3


source to share


1 answer


Well, after a while I finished my project and wrote a tutorial on how to write an LLVM register allocator using an interface RegAllocBase

.



A tutorial is written in reStructuredText

and available on GitHub: https://github.com/nael8r/How-To-Write-An-LLVM-Register-Allocator

0


source







All Articles