Gang-Ryung Uh
2010-Mar-16 19:31 UTC
[LLVMdev] how to configure llc to generate code for different architecture
Is it possible to configure llc to generate code for other architectures? For instance, what I need to do to generate Sparc machine code? Thanks. --Gang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100316/253bd016/attachment.html>
Sergey Yakoushkin
2010-Mar-16 19:43 UTC
[LLVMdev] how to configure llc to generate code for different architecture
Hi, Target architecture for llc can be specified using -march, -mcpu, -mattr options. Is it possible to override target CPU attributes when using llvm-gcc compiler? Regards, Sergey Y.
Gang-Ryung Uh
2010-Mar-16 20:11 UTC
[LLVMdev] how to configure llc to generate code for different architecture
I tried llc with -mcpu=help and it dosn't list Sparc. Thanks. --Gang On Tue, Mar 16, 2010 at 12:43 PM, Sergey Yakoushkin < sergey.yakoushkin at gmail.com> wrote:> Hi, > > Target architecture for llc can be specified using -march, -mcpu, > -mattr options. > > Is it possible to override target CPU attributes when using llvm-gcc > compiler? > > Regards, > Sergey Y. >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100316/c4b5e4eb/attachment.html>
Duncan Sands
2010-Mar-16 20:25 UTC
[LLVMdev] how to configure llc to generate code for different architecture
Hi Sergey,> Target architecture for llc can be specified using -march, -mcpu, > -mattr options. > > Is it possible to override target CPU attributes when using llvm-gcc compiler?only to the extent it is possible to do so with gcc already. For example, if gcc is built for x86 you won't be able to squirt out ppc code with it, but you can target i386, i686, various levels of sse etc. Ciao, Duncan.
Anton Korobeynikov
2010-Mar-16 20:28 UTC
[LLVMdev] how to configure llc to generate code for different architecture
> Is it possible to override target CPU attributes when using llvm-gcc compiler?No. It's a fundamental property of gcc to be compiled separately for every different target. Also, the LLVM IR obtained via llvm-gcc (or, more general, derived from C source) is not target neutral, so in most cases it does not make any sense to override the target for IR obtained this way. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Samuel Crow
2010-Mar-16 20:32 UTC
[LLVMdev] how to configure llc to generate code for different architecture
Reply inlined. ----- Original Message ----> From: Sergey Yakoushkin <sergey.yakoushkin at gmail.com> > To: llvmdev at cs.uiuc.edu; Gang-Ryung Uh <guh at boisestate.edu> > Sent: Tue, March 16, 2010 2:43:08 PM > Subject: Re: [LLVMdev] how to configure llc to generate code for different architecture > > Hi,Hello, Target architecture for llc can be specified using -march,> -mcpu,-mattr options. Is it possible to override target CPU> attributes when using llvm-gcc compiler?No. You have to either use Clang or recompile an llvm-gcc cross-compiler for the architecture you want. Regards, --Sam
Apparently Analagous Threads
- [LLVMdev] how to configure llc to generate code for different architecture
- [LLVMdev] how to configure llc to generate code for different architecture
- [LLVMdev] MIPS 32bit code generation
- [LLVMdev] MIPS 32bit code generation
- [LLVMdev] MIPS 32bit code generation