[PATCH] TargetParser prototype - NFC (ARM only)
John Brawn
john.brawn at arm.com
Fri May 1 10:21:32 PDT 2015
A general question: how far are you planning to go with this, in particular are you going to sort out cpu <-> arch mapping (which is duplicated in several places)?
I ask because I'm currently thinking about adjusting the ARM -mcpu and -march handling in clang to be more like AArch64, in particular making -march=garbage not mean -mcpu=arm7tdmi (and instead give an error), and it's be nice to not collide with what you're doing.
================
Comment at: include/llvm/Support/ARMTargetParser.h:90-91
@@ +89,4 @@
+class ARMTargetParser {
+ static StringRef getFPUSynonim(StringRef FPU);
+ static StringRef getArchSynonim(StringRef Arch);
+
----------------
Synonym.
================
Comment at: lib/Support/ARMTargetParser.cpp:157-158
@@ +156,4 @@
+ .Case("vfp4-d16", "vfpv4-d16")
+ .Cases("fp4-sp-d16", "fpv4-sp-d16", "vfpv4-d16")
+ .Cases("fp5-sp-d16", "fpv5-sp-d16", "fpv5-d16")
+ .Case("fp5-dp-d16", "fpv5-d16")
----------------
The -sp-d16 FP variants aren't synonyms for the -d16 variants. This preserves the current behaviour, where clang -S -mfpu=fpv5-sp-d16 gets you .fpu fpv5-d16 (which doesn't seem right to me), but it could at least do with a comment.
http://reviews.llvm.org/D9435
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list