[LLVMdev] Using LLVM as a cross compiler without fully retargeting gcc?

Pertti Kellomäki pk at cs.tut.fi
Tue Apr 10 04:42:49 PDT 2007


We are using LLVM to target a customizable processor
architecture. One of the activities to be supported is
architecture exploration, where one explores the processor
design space (e.g. connectivity, number of FUs) and tries
to find a good match for the application at hand.

The exploration needs to be relatively rapid, so targeting
and compiling gcc for each of the processor variants is
not feasible.

My understanding at this point is that in order to make
things work correctly, gcc needs to know about the sizes
of primitive values like ints, and it probably needs to
known the endianess of the target. But I am guessing it would
also require me to provide a description of the target
architecture, even if I am only going to use gcc for emitting
LLVM byte code.

Is this correct? If so, can I just grab any one of the targets
supported by gcc, and modify the data sizes etc. to my liking?
Any technical reasons to avoid or prefer any one of the targets?
-- 
Pertti



More information about the llvm-dev mailing list