[llvm-dev] LLVM issuse:AArch64 TargetParser

Bradley Smith via llvm-dev llvm-dev at lists.llvm.org
Thu May 5 05:01:44 PDT 2016


Hi,

Allowing -march=aarch64/arm64 is somewhat misleading I think, -march is used for specifying an architecture version to target whereas aarch64/arm64 don’t convey any information to that effect, does it mean armv8a, armv8.1-a, etc? Personally I’m in favor of having that be rejected, it would be good to have TargetParser/Clang generally reject CPUs/architectures that are not valid or don’t add information as opposed to converting them to a fairly arbitrary choice (that will and does only cause confusion).

Regards,
Bradley Smith

From: Jojo Ma [mailto:jojo.ma at linaro.org]
Sent: 05 May 2016 11:12
To: Bradley Smith; James Molloy; Kevin Qin
Cc: Renato Golin; llvm-dev at lists.llvm.org
Subject: LLVM issuse:AArch64 TargetParser


Hi everyone,

I'm a member engineer of linaro's llvm team,coming from Spreadtrum.I am a new person on LLVM.Now I'm writing a Target Parser for AArch64,so options parsing of AArch64 about cpu & arch & fpu can be summary to one place.

In the TargetParser,we assume "aarch64" and "arm64" are synonyms of armv8a(as they are only for armv8a,people usually do this). So after using AArch64TargetParser in options parsing in Clang,using "-march=aarch64" and "-march=arm64" are both valid.

I saw Kevin has a different view on this in his submission:r213353.
+// RUN: %clang -target aarch64 -march=arm64 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ARCH-NOT-ACCEPT %s
+// RUN: %clang -target aarch64 -march=aarch64 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ARCH-NOT-ACCEPT %s
+// CHECK-ARCH-NOT-ACCEPT: error: the clang compiler does not support

So I failed on the regression testing.So I think we should reach a consensus on this issue.
Would you mind letting me know what you think of this issuse?

Thank you very much!Looking forward to your reply!
I enclose the attachments for your reference.

Best Regards,
Jojo.ma
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160505/4c3ca113/attachment.html>


More information about the llvm-dev mailing list