[PATCH] D41697: [DebugInfo][Metadata] Add support for a DIExpression as 'count' field of DISubrange.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 3 14:46:42 PST 2018


sdesmalen added a comment.

Hi @aprantl, the reason for extending the count field with DIExpression was originally to express the size of an SVE vector, which is expressed as a scaling of a Dwarf pseudo register that represents the size of a vector with so-called 'Vector Granules'. This pseudo register is detailed in section 3.1 of the DWARF for the ARMĀ® 64-bit Architecture (AArch64) with SVE support Documentation (https://developer.arm.com/docs/100985/0000).

There may also be reasons to combine a DIVariable with a DIExpression, but that's not required for C99 VLAs. I think it would be needed for Fortran arrays to e.g. access a field of an array descriptor object, but I'm not sure if something as advanced is required like you propose here (perhaps something similar to DIGlobalVariableExpression that combines a DI(Local)Variable and a DIExpression would be sufficient?). Do you have any other use-case in mind that would require something like that?


https://reviews.llvm.org/D41697





More information about the llvm-commits mailing list