Skip to content

Commit a5fa2dc

Browse files
committed
[AArch64] Add command-line options for Statistical Profiling Extension
This adds the "+profile" and +noprofile" suffixes for the -march and -mcpu options, to allow enabling or disabling the options Statistical Profiling Extension to ARMv8.2-A. Differential Revision: http://reviews.llvm.org/D15023 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254161 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 8286566 commit a5fa2dc

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/Driver/Tools.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -2032,11 +2032,13 @@ static bool DecodeAArch64Features(const Driver &D, StringRef text,
20322032
.Case("crc", "+crc")
20332033
.Case("crypto", "+crypto")
20342034
.Case("fp16", "+fullfp16")
2035+
.Case("profile", "+spe")
20352036
.Case("nofp", "-fp-armv8")
20362037
.Case("nosimd", "-neon")
20372038
.Case("nocrc", "-crc")
20382039
.Case("nocrypto", "-crypto")
20392040
.Case("nofp16", "-fullfp16")
2041+
.Case("noprofile", "-spe")
20402042
.Default(nullptr);
20412043
if (result)
20422044
Features.push_back(result);

test/Driver/aarch64-cpus.c

+6
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@
126126
// RUN: %clang -target aarch64 -march=armv8.2-a+fp16 -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV82A-FP16 %s
127127
// GENERICV82A-FP16: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "generic" "-target-feature" "+neon" "-target-feature" "+v8.2a" "-target-feature" "+fullfp16"
128128

129+
// RUN: %clang -target aarch64 -march=armv8.2-a+profile -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV82A-SPE %s
130+
// GENERICV82A-SPE: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "generic" "-target-feature" "+neon" "-target-feature" "+v8.2a" "-target-feature" "+spe"
131+
//
132+
// RUN: %clang -target aarch64 -march=armv8.2-a+fp16+profile -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV82A-FP16-SPE %s
133+
// GENERICV82A-FP16-SPE: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "generic" "-target-feature" "+neon" "-target-feature" "+v8.2a" "-target-feature" "+fullfp16" "-target-feature" "+spe"
134+
129135
// ================== Check whether -march accepts mixed-case values.
130136
// RUN: %clang -target aarch64_be -march=ARMV8.1A -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV81A-BE %s
131137
// RUN: %clang -target aarch64_be -march=ARMV8.1-A -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV81A-BE %s

0 commit comments

Comments
 (0)