Hi, I am writing you because I found in the LLVM site you have worked with backends. I am writing a new backend for a processor I am working on, because the compiler that comes with the processor design suite is really messy (it is CoSy). I want to have a power compiler like llvm. I read the "writing an LLVM compiler backend" and I have define almost all the files, but I have problems with the files for the instructions set. XXXInstrInfo.td is giving a headache, I have not found enough information about all the things I have to define hear. I also tried program by example and see the files for the PIC16, Sparc and MIPS but they are so different as to get a pattern. Do you have any information I can use for define my new backend? I really appreciate your attention and any help you can give me. Greetings Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110509/1e3d36d0/attachment.html>
Hello Roberto,> Do you have any information I can use for define my new backend? I really > appreciate your attention and any help you can give me.You might want to look into some of the existing backends. Probably MSP430 is the smallest one. Try to examine the history how this backend was added, it was preserved specifically for educational purposes. I must note that it was added 2 years ago, so some API already changed... http://www.llvm.org/devmtg/2009-10/Korobeynikov_BackendTutorial.pdf might help as well. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
I have been analyzing the implementation for some backend (PIC16, MIPS, SPARC and MSP430) my main problem is that they are so much different, I mean obviously they are describing different architectures, but the file structure is not the same. So it is difficult to get a pattern. I have checked the available documentation files, also the video from Cardoso about how to write a backend for the MIPS but the problem is the same, all the documention said what the files have to contain but not the details about write them. I need to write a backend for the PIC24, our processor is based on it, so I started analyzing the files for the implementation of the PIC16, all was ok until I analyzed the files PIC16ILowering.cpp and PICInstrInfo.td, this files have defined many things like SDTypeProfile and SDNode and other things I don't have idea from where they come. I mean I tried to find this info from other files, llvm.org and google and no idea. I have checked the documentation, after read it I thought the implementation will be a not to difficult job, but analyzing the files I realized I didn't have idea about the magnitude of the problem. Any suggestion will be appreciated. Best Regards Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110510/3a823231/attachment.html>