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

Kristof Beyls kristof.beyls at arm.com
Thu Jul 17 01:21:51 PDT 2014


================
Comment at: lib/Driver/Tools.cpp:1602
@@ +1601,3 @@
+static bool
+getAArch64MacroArchFeaturesFromMtune(const Driver &D, StringRef Mtune,
+                                     const ArgList &Args,
----------------
"Macro" -> "Micro"?

================
Comment at: lib/Driver/Tools.cpp:1616
@@ +1615,3 @@
+static bool
+getAArch64MacroArchFeaturesFromMcpu(const Driver &D, StringRef Mcpu,
+                                    const ArgList &Args,
----------------
"Macro" -> "Micro"?

================
Comment at: test/Driver/aarch64-cpus.c:20
@@ -19,1 +19,3 @@
+// RUN: %clang -target aarch64 -mtune=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CA53 %s
+// RUN: %clang -target aarch64_be -mlittle-endian -mtune=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CA53 %s
 // CA53: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "cortex-a53"
----------------
>From an earlier comment you made: " '-mtune' won't automatically change any architecture level feature selection, but will enable some micro architecture feature according to CPU. For example, '-mtune=cyclone' won't enable crypto, but will enable zcm and zcz, and also enable all special pass and scheduler. "

With this patch, it seems mtune would be doing the wrong thing: changing the architecture being targeted (i.e. which instructions can be generated); not just which micro-architecture to optimize for.
That seems wrong to me.
At the moment, it seems the only useful information -mtune could provide to the backend for micro-architecture tuning without changing the architecture targeted are the sub-target-features +zcm and +zcz?

http://reviews.llvm.org/D4346






More information about the cfe-commits mailing list