[PATCH] Refactor ARM subarchitecture parsing.

Tim Northover t.p.northover at gmail.com
Fri Jul 4 04:44:37 PDT 2014


================
Comment at: include/llvm/ADT/Triple.h:81
@@ -80,1 +80,3 @@
   };
+  enum SubArchType {
+    NoSubArch,
----------------
Renato Golin wrote:
> I'd number them in sequential order, so you can do tricks like Arch > v5.
I actually quite like the original: comparing architectures like that on ARM is extremely suspect since they form a partial order (Is v6m > v4t?).

Sorting in some kind of reverse (as here) reduces the temptation to do that since even the obvious comparisons will be "wrong".

================
Comment at: include/llvm/ADT/Triple.h:84
@@ +83,3 @@
+
+    v8,
+    v7,
----------------
Triple is generic code. At the very least we should prefix these with "ARMSubArch" or something to avoid polluting other targets.

http://reviews.llvm.org/D4375






More information about the llvm-commits mailing list