[clang] [CLANG][AArch64] Add the modal 8 bit floating-point scalar type (PR #97277)

Paul Walker via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 24 09:15:59 PDT 2024


================
@@ -97,6 +97,12 @@
   SVE_TYPE(Name, Id, SingletonId)
 #endif
 
+#ifndef AARCH64_OPAQUE_TYPE
+#define AARCH64_OPAQUE_TYPE(Name, MangledName, Id, SingletonId, NumEls, \
+                            ElBits, NF) \
+  SVE_TYPE(Name, Id, SingletonId)
+#endif
+
----------------
paulwalker-arm wrote:

The `AARCH64_###_TYPE` macros are supposed to take just the four parameters `Name, MangledName, Id, SingletonId` because the intent is for them to be used in generic code where only those parameters are used.

Not doing this is why you've had to break several of the `SVE_TYPE` usages apart.  I think perhaps you want to define:
```
AARCH64_SCALAR_TYPE(Name, MangledName, Id, SingletonId)
```
and then if you need extra details specific to __mfp8 you'd define `AARCH64_SCALAR_TYPE_MFLOAT`.

Depending on the uses it might be the case that you need something below `SVE_TYPE` (e.g. `AARCH64_TYPE`) so there's a macro for all type, and then separate macros for vector and scalar types, each of which are further subdivided base on their need.

https://github.com/llvm/llvm-project/pull/97277


More information about the cfe-commits mailing list