[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
================
@@ -782,6 +782,13 @@ llvm::DIType *CGDebugInfo::CreateType(const BuiltinType *BT) {
#define SVE_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
#include "clang/Basic/AArch64SVEACLETypes.def"
{
+ if (BT->getKind() == BuiltinType::ArmMFloat8) {
+ Encoding = llvm::dwarf::DW_ATE_unsigned_char;
+ BTName = BT->getName(CGM.getLangOpts());
+ // Bit size and offset of the type.
+ uint64_t Size = CGM.getContext().getTypeSize(BT);
+ return DBuilder.createBasicType(BTName, Size, Encoding);
+ }
----------------
paulwalker-arm wrote:
I think this might be problematic. Whilst using i8 vectors with for vmfloat8_t is mostly an implementation detail I don't think the same holds for scalar types.
The problem with using i8 as the backing type is that it means data will be passed via GPRs instead of FPRs, which is an ABI decision. If the intent is for such types to be passed via FPRs then I suspect the clang side of things might have to wait until we've got the LLVM side covered.
https://github.com/llvm/llvm-project/pull/97277
More information about the cfe-commits
mailing list