Need to help on how to write An LLVM Register Allocator pass

Hello All,

I wanted to write new register allocation pass. To start with, I have used graph coloring based allocation sample file[Gcra.cpp]. I am tring build the LLVM after dropping this file into lib/CodeGen, and adding references to createGcra to include/lib/CodeGen/Passes.h and include/lib/CodeGen/LinkAllCodeGenComponents.h.

I am getting following error while building the LLVM.

Gcra.cpp (6.02 KB)

Passes.h (21.2 KB)

LinkAllCodegenComponents.h (2.08 KB)

Sorry, forgot to attach the build error log file.
LLVM build giving following error

/home/iiita/cse231-proj1/llvm/src/lib/CodeGen/Gcra.cpp:172:6: error: use of undeclared identifier ‘createGcra’
createGcra);

I have attached log file for reference.

Any kind of help is appreciated!!

Thanks,
Bala

error.txt (945 Bytes)