[cfe-dev] OpenCL SPIR/NVPTX code generation

ankur deshwal a.s.deshwal at gmail.com
Wed Jan 23 23:50:46 PST 2013


Hello everyone,

Thanks a lot for the help.

-target nvptx worked great with llvm-3.2. However it gives error with
-target spir.

LLVM/Clang trunk although works good for both options ( probably because
spir is still work in progress ).


Thanks again.
- Ankur




On Thu, Jan 24, 2013 at 12:43 PM, Benyei, Guy <guy.benyei at intel.com> wrote:

>  Hi Jordan,****
>
> You’re right, and the driver -target option works perfectly with the SPIR
> triples.****
>
> ** **
>
> Thanks****
>
>    Guy Benyei****
>
> [image: email_signature_guy_new2]****
>
> ** **
>
> *From:* Jordan Rose [mailto:jordan_rose at apple.com]
> *Sent:* Wednesday, January 23, 2013 19:47
> *To:* Benyei, Guy
> *Cc:* ankur deshwal; cfe-dev at cs.uiuc.edu; llvmdev at cs.uiuc.edu
> *Subject:* Re: [cfe-dev] OpenCL SPIR/NVPTX code generation****
>
> ** **
>
> ** **
>
> On Jan 23, 2013, at 4:04 , "Benyei, Guy" <guy.benyei at intel.com> wrote:****
>
>
>
> ****
>
> Hi Ankur,****
>
> Since you use –Xclang, the clang executable passes multiple triples to
> “clang -cc1”. You can see that if you add the -v option. I’m sure there is
> someone here who can explain it better than I…****
>
> Anyhow, I think you better use clang -cc1. Make sure -cc1 is the first
> command line option you use.****
>
>  ****
>
> $ clang -cc1 -fno-builtin -emit-llvm-bc -triple spir-unknown-unknown
> Simple_Kernel.cl -o Simple_Kernel.bc****
>
>  ****
>
> should work for you.****
>
> ** **
>
> clang -cc1 shouldn't ever be necessary for end users of clang,
> particularly because cc1 options are not guaranteed to be stable. You also
> lose all the default options that the driver normally passes down. It's
> possible this doesn't matter much for SPIR, at least not right now, but
> it's not something we should be recommending or supporting.****
>
> ** **
>
> -target is the driver version of -triple. This "worked" for me, where by
> "worked" I mean "generated some output but I don't know enough about SPIR
> to validate it".****
>
> ** **
>
> % clang -x cl -fno-builtin -target spir -c -emit-llvm****
>
> ** **
>
> Jordan****
>
> ** **
>
> ---------------------------------------------------------------------
> Intel Israel (74) Limited
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130124/27644a20/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 24800 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130124/27644a20/attachment.png>


More information about the cfe-dev mailing list