[RFC] Nios II backend

Hello Joerg,

I am proposing the integration of a backend targeting Nios II processor architecture.

Nice to hear that.

Plan for initial implementation corresponding to patches (obviously the plan can be changed after comments)
- Target registration
  a) Nios2.td, Nios2.h, Nios2TargetMachine.h, Nios2TargetMachine.cpp, Nios2Subtarget.h, Nios2Subtarget.cpp, TargetInfo/Nios2TargetInfo.cpp
  b) MCTargetDesc/Nios2MCTargetDesc.h, MCTargetDesc/Nios2MCTargetDesc.cpp...
- Register information (Nios2RegisterInfo.cpp, Nios2RegisterInfo.h, Nios2RegisterInfo.td)
- ISA specification (Nios2InstrFormats.td, Nios2InstrInfo.cpp, Nios2InstrInfo.h, Nios2InstrInfo.td)
- GlobalISel (At the moment I use DAG selector, but work on porting to GlobalISel is already started)
- Assembly printer (InstPrinter/Nios2InstPrinter.h, InstPrinter/Nios2InstPrinter.cpp, Nios2AsmPrinter.cpp, Nios2AsmPrinter.h, MCTargetDesc/Nios2MCAsmInfo.cpp, MCTargetDesc/Nios2MCAsmInfo.h, .)
- Target triple registration in clang
- Built-in functions (clang and codegen part)
- New options support (clang driver and codegen part)
- Direct ELF streaming (binary emission)

As discussed in the recent target review threads, I would strongly
recommend doing the assembly printer and even possibly the ELF emission
as early as possible. Most of the other changes like the ISA
specification and register information are more difficult to test
without them and LLVM has a very strong preference for testing for all
new code.

Thanks for the valuable recommendation. I will follow it.

Joerg

Thanks,
Andrei.