<div dir="ltr">Thanks, Reid<div><br></div><div>The reason I want to pass -mcpu is that I want to specify the subtarget so that when llc does the instruction scheduling, it would takes the subtarget scheduling information into consideration. I'm not sure --target flag will get what I want ...</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-10-13 16:55 GMT-04:00 Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>You'll be a lot better off if you use the gcc-style flags that clang accepts. If you bypass clang, it will generate LLVM IR for the default target, and then attempt to compile that IR using the triple you provided to llc.<br></div><div><br></div><div>Try 'clang --target=x86_64-linux-gnu' or whatever your target is.</div><div><br></div><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5">On Mon, Oct 13, 2014 at 12:48 PM, Ziqiang Patrick Huang <span dir="ltr"><<a href="mailto:ziqiang.huang1001@gmail.com" target="_blank">ziqiang.huang1001@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi, <div><br></div><div>Is there a way to passing llc options to clang, for example -march -mcpu, etc. ? </div><div><br></div><div>Some threads suggested using -mllvm flag,</div><div><br></div><div>I tried ./clang -mllvm -march=X86-64 -mcpu=core2 -o hello hello.c, but got "Unknown command line argument"</div><div><br></div><div>Thanks,</div><div>Ziqiang </div><div><br clear="all"><div><br></div><br><div dir="ltr"><div><b></b></div></div></div></div>
<br></div></div>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><b>Ziqiang Huang</b><div><div><b>Electrical and Computer Engineering</b></div><div><b>Hudson 213c, Duke University</b></div></div><div><b>Tel: 919-491-3677</b></div><div><b>Email: <a href="mailto:ziqiang.huang@duke.edu" target="_blank">ziqiang.huang@duke.edu</a></b></div></div>
</div>