[PATCH] D86101: [AArch64][SVE] Add missing debug info for ACLE types.

Sander de Smalen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 26 04:09:01 PDT 2020


sdesmalen added inline comments.


================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:734
+      if (Info.ElementType == CGM.getContext().BoolTy)
+        NumElemsPerVG /= 8;
+
----------------
efriedma wrote:
> I guess NumElemsPerVG of a bool vector is always divisible by 8 because we don't expose `<vscale x 2 x i1>` etc.?
Yes, that's right. Only `svbool_t`, i.e. `<vscale x 16 x i1>` is exposed.


================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:748
+      llvm::DINodeArray SubscriptArray = DBuilder.getOrCreateArray(Subscript);
+      llvm::DIType *ElemTy =
+          getOrCreateType(Info.ElementType, TheCU->getFile());
----------------
rsandifo-arm wrote:
> I might be misreading the code, but if we're representing svbool_t as a bitmask (which is a good approach IMO), would it be better to pass UnsignedCharTy rather than BoolTy here?  It seems odd to represent the type as <vscale x 2> “bools”.
You're right, good shout!


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp:1404
+          ? Subrange->getCount().get<ConstantInt *>()->getSExtValue()
+          : 0;
 
----------------
efriedma wrote:
> Do we need a test for this change?
Yes it does, thanks for pointing out!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86101/new/

https://reviews.llvm.org/D86101



More information about the cfe-commits mailing list