Previously I sent an RFC regarding Nios2 backend introduction in LLVM compiler. It was 12 of April with subject "[llvm-dev] [RFC] Nios II backend".
So there is the first patch for registering Nios2 target.
I registered triple for Nios2, created Nios2 directory in Target and added several initial files for Nios2 target.
In this patch I introduced general classes for Nios2 instructions and register set. An example of one instruction is also added.
So my aim was to prepare patch without tons of lines of code to be simple for review. Let me know, please, if anyway this patch is too big. Or probably, in opposite, you would like to have more changes related to Nios2 target.
I checked llc with this patch, it accepts Nios2 triple and architecture. In the next patch I plan to introduce Nios2 subtargets and cover R1 instructions. (Nios2 architecture has two ISA, R1 and R2. R1 is described here: https://www.altera.com/en_US/pdfs/literature/hb/nios2/n2cpu-nii5v1gen2.pdf)
Current status of Nios2 project is I can produce correct assembly for simple test cases. That assembly is checked for correctness on Nios2 hardware.
To test that I did not break anything, I built common targets and ran "make check".
I'm open for any questions, suggestions, advices and objections.
Thanks in advance,