Balasaheb Dabhade via llvm-dev
2016-Mar-08 19:10 UTC
[llvm-dev] 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160309/4fc75b07/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: Gcra.cpp Type: text/x-c++src Size: 6168 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160309/4fc75b07/attachment.cpp> -------------- next part -------------- A non-text attachment was scrubbed... Name: Passes.h Type: text/x-chdr Size: 21748 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160309/4fc75b07/attachment.h> -------------- next part -------------- A non-text attachment was scrubbed... Name: LinkAllCodegenComponents.h Type: text/x-chdr Size: 2127 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160309/4fc75b07/attachment-0001.h>
Balasaheb Dabhade via llvm-dev
2016-Mar-08 19:13 UTC
[llvm-dev] Need to help on how to write An LLVM Register Allocator pass
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 On Wed, Mar 9, 2016 at 12:40 AM, Balasaheb Dabhade < dabhadebalasaheb at gmail.com> wrote:> 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. > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160309/dee6b256/attachment.html> -------------- next part -------------- llvm[2]: Compiling GCMetadataPrinter.cpp for Release+Asserts build llvm[2]: Compiling GCStrategy.cpp for Release+Asserts build llvm[2]: Compiling Gcra.cpp for Release+Asserts build /home/iiita/cse231-proj1/llvm/src/lib/CodeGen/Gcra.cpp:172:6: error: use of undeclared identifier 'createGcra' createGcra); ^ /home/iiita/cse231-proj1/llvm/src/lib/CodeGen/Gcra.cpp:177:22: error: out-of-line definition of 'createGcra' does not match any declaration in namespace 'llvm' FunctionPass *llvm::createGcra() ^~~~~~~~~~ 2 errors generated. make[2]: *** [/home/iiita/cse231-proj1/llvm/build/lib/CodeGen/Release+Asserts/Gcra.o] Error 1 make[2]: Leaving directory `/home/iiita/cse231-proj1/llvm/build/lib/CodeGen' make[1]: *** [CodeGen/.makeall] Error 2 make[1]: Leaving directory `/home/iiita/cse231-proj1/llvm/build/lib' make: *** [all] Error 1