This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Add missing debug info for ACLE types.
ClosedPublic

Authored by sdesmalen on Aug 17 2020, 12:51 PM.

Details

Summary

This patch adds type information for SVE ACLE vector types,
by describing them as vectors, with a lower bound of 0, and
an upper bound described by a DWARF expression using the
AArch64 Vector Granule register (VG), which contains the
runtime multiple of 64bit granules in an SVE vector.

Diff Detail

Event Timeline

sdesmalen created this revision.Aug 17 2020, 12:51 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
sdesmalen requested review of this revision.Aug 17 2020, 12:51 PM
efriedma added inline comments.Aug 18 2020, 2:17 PM
clang/lib/CodeGen/CGDebugInfo.cpp
734

I guess NumElemsPerVG of a bool vector is always divisible by 8 because we don't expose <vscale x 2 x i1> etc.?

llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
1404

Do we need a test for this change?

rsandifo-arm added inline comments.Aug 19 2020, 3:15 AM
clang/lib/CodeGen/CGDebugInfo.cpp
748

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”.

sdesmalen updated this revision to Diff 287911.Aug 26 2020, 4:08 AM
  • Choose unsigned char element type for svbool_t bitpattern.
  • Added LLVM test to ensure debug info for the vector type is correctly codegenerated when DISubrange has upper bound instead of count.
clang/lib/CodeGen/CGDebugInfo.cpp
734

Yes, that's right. Only svbool_t, i.e. <vscale x 16 x i1> is exposed.

748

You're right, good shout!

llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
1404

Yes it does, thanks for pointing out!

This revision is now accepted and ready to land.Aug 26 2020, 2:02 PM
This revision was automatically updated to reflect the committed changes.

Thanks for the review!