<div class="gmail_quote">On Wed, Sep 14, 2011 at 12:31 PM, Arnaud Allard de Grandmaison <span dir="ltr"><<a href="mailto:Arnaud.AllardDeGrandMaison@dibcom.com">Arnaud.AllardDeGrandMaison@dibcom.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">




<u></u>





<div lang="EN-US" link="blue" vlink="#606420">

<div>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">Hi Justin<u></u><u></u></span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy"><u></u> <u></u></span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">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.</span></font></p></div></div></blockquote><div><br></div><div>Unfortunately, that does not work, at least not with ToT:</div><div><br></div><div>
<font class="Apple-style-span" face="'courier new', monospace">$ clang -ccc-host-triple ptx32 test1.c -S -O1 -mllvm -mattr=double</font></div><div><font class="Apple-style-span" face="'courier new', monospace">clang (LLVM option parsing): Unknown command line argument '-mattr=double'.  Try: 'clang (LLVM option parsing) -help'</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">clang (LLVM option parsing): Did you mean '-stats=double'?</font></div><div><br></div><div>For reference, what I want to replace is:</div>
<div><br></div><div><font class="Apple-style-span" face="'courier new', monospace">$ clang -ccc-host-triple ptx32 test1.c -S -O1 -emit-llvm && llc -mattr=double test1.s -o test1.ptx</font></div><div><br></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div lang="EN-US" link="blue" vlink="#606420"><div><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy"><u></u><u></u></span></font></p>


<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy"><u></u> <u></u></span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">Cheers,<u></u><u></u></span></font></p>

<div>

<p class="MsoNormal"><font size="2" color="navy" face="Courier New"><span lang="FR" style="font-size:10.0pt;font-family:"Courier New";color:navy">-- <u></u><u></u></span></font></p>

<p class="MsoNormal"><u></u><font size="2" color="navy" face="Courier New"><span lang="FR" style="font-size:10.0pt;font-family:"Courier New";color:navy">Arnaud de Grandmaison</span></font><u></u><font size="2" color="navy" face="Courier New"><span lang="FR" style="font-size:10.0pt;font-family:"Courier New";color:navy"> <u></u><u></u></span></font></p>


</div>

<div>

<div class="MsoNormal" align="center" style="text-align:center"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">

<hr size="2" width="100%" align="center">

</span></font></div>

<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma;font-weight:bold">From:</span></font></b><font size="2" face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma">
<a href="mailto:cfe-dev-bounces@cs.uiuc.edu" target="_blank">cfe-dev-bounces@cs.uiuc.edu</a> [mailto:<a href="mailto:cfe-dev-bounces@cs.uiuc.edu" target="_blank">cfe-dev-bounces@cs.uiuc.edu</a>] <b><span style="font-weight:bold">On Behalf Of </span></b>Justin Holewinski<br>

<b><span style="font-weight:bold">Sent:</span></b> Wednesday, September 14,
2011 3:45 PM<br>
<b><span style="font-weight:bold">To:</span></b> clang-dev Developers<br>
<b><span style="font-weight:bold">Subject:</span></b> [cfe-dev] Passing
Arguments to Back-End</span></font><u></u><u></u></p>

</div><div><div></div><div class="h5">

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">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.<u></u><u></u></span></font></p>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">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.<br clear="all">
<u></u><u></u></span></font></p>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>

</div>

<p class="MsoNormal" style="margin-bottom:12.0pt"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">-- <u></u><u></u></span></font></p>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Thanks,<u></u><u></u></span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Justin Holewinski<u></u><u></u></span></font></p>

</div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>

</div>

</div></div></div>

</div>


</blockquote></div><br><br clear="all"><div><br></div>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div><br>