From: Chris Lattner
- #include ""llvm/CodeGen/RegAllocRegistry.h"" + #include "llvm/CodeGen/RegAllocRegistry.h"
Also in your register allocator .cpp file, define a creator function in the @@ -1522,8 +1522,8 @@ $ llc --help
And that's it. The user is now free to use -regalloc=myregalloc as an option. Registering instruction schedulers is similar except use the -RegisterRegAlloc class. Note that the -RegisterRegAlloc::FunctionPassCtor is significantly different from +RegisterScheduler class. Note that the +RegisterScheduler::FunctionPassCtor is significantly different from RegisterRegAlloc::FunctionPassCtor.
To force the load/linking of your register allocator into the llc/lli tools,