[cfe-dev] Passing Arguments to Back-End
Justin Holewinski
justin.holewinski at gmail.com
Wed Sep 14 11:30:57 PDT 2011
On Wed, Sep 14, 2011 at 12:31 PM, Arnaud Allard de Grandmaison <
Arnaud.AllardDeGrandMaison at dibcom.com> wrote:
> **
>
> Hi Justin****
>
> ** **
>
> You can try the clang’s hidden ‘-llvm’ switch like this : ‘-llvm
> –mcpu=mycpu’ to pass options to the backend. I do not know for top of tree,
> but this works fine with llvm-2.9.
>
Unfortunately, that does not work, at least not with ToT:
$ clang -ccc-host-triple ptx32 test1.c -S -O1 -mllvm -mattr=double
clang (LLVM option parsing): Unknown command line argument '-mattr=double'.
Try: 'clang (LLVM option parsing) -help'
clang (LLVM option parsing): Did you mean '-stats=double'?
For reference, what I want to replace is:
$ clang -ccc-host-triple ptx32 test1.c -S -O1 -emit-llvm && llc
-mattr=double test1.s -o test1.ptx
****
>
> ** **
>
> Cheers,****
>
> -- ****
>
> **Arnaud de Grandmaison** ****
> ------------------------------
>
> *From:* cfe-dev-bounces at cs.uiuc.edu [mailto:cfe-dev-bounces at cs.uiuc.edu] *On
> Behalf Of *Justin Holewinski
> *Sent:* Wednesday, September 14, 2011 3:45 PM
> *To:* clang-dev Developers
> *Subject:* [cfe-dev] Passing Arguments to Back-End****
>
> ** **
>
> Using Clang, is there any way to specify -mcpu and -mattr options for the
> back-end? I am using -ccc-host-triple to force the triple to ptx32--. I
> have tried -mcpu and -mtarget with Clang, but I just get the "argument
> unused during compilation" warning.****
>
> ** **
>
> For context, my back-end supports -mattr=+double. I can pass this argument
> to llc. Is there a command-line option in Clang to pass this along to the
> back-end? I know I can use -emit-llvm and then invoke llc manually, but I
> would like to let Clang handle this, if possible.
> ****
>
> ** **
>
> -- ****
>
> Thanks,****
>
> ** **
>
> Justin Holewinski****
>
> ** **
>
--
Thanks,
Justin Holewinski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110914/a8d7448d/attachment.html>
More information about the cfe-dev
mailing list