Add a new register allocation pass llvm

1.4k Views Asked by At

I am writing a new register allocation pass on llvm. I followed the instructions here http://llvm.org/docs/WritingAnLLVMPass.html#the-machinefunctionpass-class.

The pass is not displayed in llc --help. I changed the greedy allocation algorithm to register by the name "greedier" and built. Even this doesn't seem to be reflecting in llc. Can anyone help?

2

There are 2 best solutions below

3
On

Are you sure you should be looking in llc and not opt ?

0
On

Did you also look at this? http://llvm.org/docs/WritingAnLLVMPass.html#using-existing-registries

Recently I implemented an register allocator and following these instructions I was able to register it perfectly in llc using LLVM version 3.6.2.