Hi Developers, I have written C program and want to generate IR file for Specific Target I have tried with following command but got a error as follows, COMMAND: *clang -S -emit-llvm -march=leg ~/llc-test-examples/ex9.c -o ~/llc-test-examples/ex9.ll* ERROR: *error: unknown target CPU 'leg'* So any please help me what all other step should I do previously to get my *leg* target in clang. So that i can use -march=leg option in this command. Thanks and Regards Varun -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161123/abd0bac6/attachment.html>
Krzysztof Parzyszek via llvm-dev
2016-Nov-23 15:25 UTC
[llvm-dev] Generation of IR for MyTarget
There are several different pieces here. Assuming that you have added your target triple to Triple.h/.cpp, and have the LLVM part working, you need to create TargetInfo, and the corresponding toolchain. Look in the clang repository in lib/Basic/Targets.cpp lib/Driver/Tools.cpp lib/Driver/ToolChains.cpp To see how it's done for other targets. -Krzysztof On 11/23/2016 5:56 AM, Varun Patil via llvm-dev wrote:> Hi Developers, > > I have written C program and want to generate IR file for Specific > Target I have tried with following command but got a error as follows, > COMMAND: > *clang -S -emit-llvm -march=leg ~/llc-test-examples/ex9.c -o > ~/llc-test-examples/ex9.ll* > ERROR: > *error: unknown target CPU 'leg' > * > So any please help me what all other step should I do previously to get > my *leg* target in clang. So that i can use -march=leg option in this > command. > > Thanks and Regards > Varun > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >
please help me guys Thanks and Regards Varun On Wed, Nov 23, 2016 at 5:26 PM, Varun Patil <varun.patil40 at gmail.com> wrote:> Hi Developers, > > I have written C program and want to generate IR file for Specific Target > I have tried with following command but got a error as follows, > COMMAND: > *clang -S -emit-llvm -march=leg ~/llc-test-examples/ex9.c -o > ~/llc-test-examples/ex9.ll* > ERROR: > > *error: unknown target CPU 'leg'* > So any please help me what all other step should I do previously to get my > *leg* target in clang. So that i can use -march=leg option in this > command. > > Thanks and Regards > Varun >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161124/82b854f3/attachment.html>
Madhur Amilkanthwar via llvm-dev
2016-Nov-24 05:07 UTC
[llvm-dev] Generation of IR for MyTarget
Varun, Have you tried suggestions made by Krzysztof? On Thu, Nov 24, 2016 at 10:14 AM, Varun Patil via llvm-dev < llvm-dev at lists.llvm.org> wrote:> please help me guys > > > > > Thanks and Regards > Varun > > On Wed, Nov 23, 2016 at 5:26 PM, Varun Patil <varun.patil40 at gmail.com> > wrote: > >> Hi Developers, >> >> I have written C program and want to generate IR file for Specific Target >> I have tried with following command but got a error as follows, >> COMMAND: >> *clang -S -emit-llvm -march=leg ~/llc-test-examples/ex9.c -o >> ~/llc-test-examples/ex9.ll* >> ERROR: >> >> *error: unknown target CPU 'leg'* >> So any please help me what all other step should I do previously to get >> my *leg* target in clang. So that i can use -march=leg option in this >> command. >> >> Thanks and Regards >> Varun >> > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-- *Disclaimer: Views, concerns, thoughts, questions, ideas expressed in this mail are of my own and my employer has no take in it. * Thank You. Madhur D. Amilkanthwar -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161124/40b10d14/attachment.html>