[PATCH] [AArch64] Implement Clang CLI interface proposal about "-march".

Kevin Qin kevinqindev at gmail.com
Mon Jun 30 03:34:27 PDT 2014

Hi t.p.northover,

This patch is to cover below changes for AArch64 target.

1. Revert "Add default feature for CPUs on AArch64 target in Clang" at r210625. Because it gets conflict with the rule that architecture feature should only be decided by "-march". 

2. Get "-mfpu" deprecated.

3. Implement support of "-march". Usage is: "-march=armv8-a+[no]feature". For instance, "-march=armv8-a+neon+crc+nocrypto".  Here "armv8-a" is necessary, and CPU names are not acceptable.  Candidate features are fp, neon,  crc and crypto.

4. Implement support of "-mtune". Usage is: "-march=CPU_NAME". For instance, "-march=cortex-a57". This option will ONLY get micro-architecture level feature enabled specifying to target CPU, like "zcm" and "zcz" for cyclone. Any architecture features WON'T be modified.

5. Change usage of "-mcpu" to "-mcpu=CPU_NAME+[no]feature", which is an alias to "-march={feature of CPU_NAME}+[no]feature" and "-mtune=CPU_NAME" together. An warning is added to discourage use of this option.

Here are some summary may concern.

1. Neon is enabled by default, and "generic" will be used if no CPU type is specified.

2. For most scenario, Using "-mtune=CPU" only is recommended as neon is enabled by default and all micro-architecture optimizations are selected, and it would provide great compatibility to run on most of AArch64 devices.

3. "-march" is designed to be used only if user wants to use crc and crypto instructions, or disable fp/neon. So "-march" will not be frequently used and won't bring too much finger burden. 



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4346.10973.patch
Type: text/x-patch
Size: 25044 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140630/541bf8f3/attachment.bin>

More information about the cfe-commits mailing list