[PATCH] D41695: [Metadata] Extend 'count' field of DISubrange to take a metadata node

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 4 10:58:40 PST 2018

rnk added a comment.

In https://reviews.llvm.org/D41695#967128, @probinson wrote:

> In https://reviews.llvm.org/D41695#967020, @rnk wrote:
> > I'm concerned this will blow up memory usage of commonly encountered array types.
> Which "this"?

Turning an int64_t into a pointer to a ConstantAsMetadata of ConstantInt, which is what this does for regular arrays, I think.

> Sander's proposal looks like one node per variable-length array, which is surely not very much.  I think Adrian is suggesting always having the count be an expression, which is one node per array type (with some deduplication possible, I hope, for arrays of the same length).  Then I came along and suggested another one for the lower bound, but those would almost always be expressions for 0 and 1, so that's two nodes total per CU.  Unless I'm misunderstanding how DIExpression works (very possible).


More information about the llvm-commits mailing list