(original) (raw)
Thanks, Reid
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 ...
2014-10-13 16:55 GMT-04:00 Reid Kleckner <rnk@google.com>:
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.Try 'clang --target=x86\_64-linux-gnu' or whatever your target is.On Mon, Oct 13, 2014 at 12:48 PM, Ziqiang Patrick Huang <ziqiang.huang1001@gmail.com> wrote:\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_Hi,Is there a way to passing llc options to clang, for example -march -mcpu, etc. ?Some threads suggested using -mllvm flag,I tried ./clang -mllvm -march=X86-64 -mcpu=core2 -o hello hello.c, but got "Unknown command line argument"Thanks,Ziqiang
LLVM Developers mailing list
LLVMdev@cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Ziqiang Huang
Electrical and Computer Engineering
Hudson 213c, Duke University
Tel: 919-491-3677
Email: ziqiang.huang@duke.edu