Policy for adding new TargetInfo to Clang?

Clang has no target definitions for several LLVM targets, notably:
mips, xcore, ia64, alpha, cell
not to mention the non-machine targets:
MSIL, CppBackend, CBackend

My personal interest is to observe a variety of LLVM target backends in action and use clang to provide input for them. Lacking experience and access to some of these, I probably won’t be able to always provide complete& accurate sets of CPP predefines. Question: will you accept patches for new XXXTargetInfo classes that are possibly incompete/inaccurate, but still useful for LLVM experimentation?

G

Yes, I strongly prefer that you try to get the predefines and builtin data types close though.

-Chris

Clang has no target definitions for several LLVM targets, notably:
mips, xcore, ia64, alpha, cell

Yes... we've been adding targets as people send patches.

not to mention the non-machine targets:
MSIL, CppBackend, CBackend

CppBackend and CBackend don't require a distinct clang target; they
generate code based on some real target. I'm not sure about MSIL.

My personal interest is to observe a variety of LLVM target backends in
action and use clang to provide input for them. Lacking experience and
access to some of these, I probably won't be able to always provide
complete& accurate sets of CPP predefines. Question: will you accept
patches for new XXXTargetInfo classes that are possibly
incompete/inaccurate, but still useful for LLVM experimentation?

We don't have any restrictions on what targets we accept, but please
don't submit a target unless you have an actual machine that it
targets.

If you just want to see code generation for simple bits of C code, you
don't need a clang target; you can just use a command-line like "clang
-c -emit-llvm -o - -x c - | llc -arch=mips" to override the target
inside of code generation. The ABI won't be correct for non-trivial
pieces of code, but it should generally generate something sane.

-Eli

CppBackend and CBackend don't require a distinct clang target; they
generate code based on some real target. I'm not sure about MSIL.

Everything applicable to CBackend can be applied to MSIL as well, so,
in general: clang should not worry about non-machine targets, mostly
because they don't have any ABI, any built-in defines, etc.