Pertti Kellomäki
2007-Apr-10 11:42 UTC
[LLVMdev] Using LLVM as a cross compiler without fully retargeting gcc?
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
Pertti Kellomäki
2007-Apr-10 17:51 UTC
[LLVMdev] Using LLVM as a cross compiler without fully retargeting gcc?
Chris Lattner wrote:> Yep, that should work. If you just use -emit-llvm all the time, you > should be able to use any target GCC supports.Great. Thanks! -- Pertti
Chris Lattner
2007-Apr-10 18:18 UTC
[LLVMdev] Using LLVM as a cross compiler without fully retargeting gcc?
On Tue, 10 Apr 2007, [ISO-8859-1] Pertti Kellom�ki wrote:> 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?Yep, that should work. If you just use -emit-llvm all the time, you should be able to use any target GCC supports.> Any technical reasons to avoid or prefer any one of the targets?Not that I can think of, -Chris -- http://nondot.org/sabre/ http://llvm.org/