[PATCH] D41695: [Metadata] Extend 'count' field of DISubrange to take a metadata node
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 5 10:01:18 PST 2018
aprantl added a comment.
In https://reviews.llvm.org/D41695#968478, @sdesmalen wrote:
> Hi all, thanks for pointing out the possible memory size issue, I didn't realise that a ConstantAsMetadata was so much bigger than an 'int' and I can see how this would have an impact on memory usage. In practice it probably depends on the number of unique DISubrange nodes with non-distinct count values in the program, where I would hope that many DISubrange nodes could be merged due to similar ranges.
>
> I ran an experiment to get high water-mark as suggested by @rnk to measure the impact, but did not see a significant difference on a Debug LTO build of Clang, but maybe I haven't run the experiment properly... I tried to monitor the cc1 and ld processes during the build and then getting the memory footprint for these processes. I'll try to run these experiments again to see if the results are sensible. Please let me know if you know of a better way to do these measurements.
I don't think LLVM uses many array types at all, so I wouldn't expect a noticeable size increase on that code size. Something array-heavy like BLAS would perhaps be a better benchmark. If memory size does turn out to be a limiting factor, we could make DISubrange variable-length.
https://reviews.llvm.org/D41695
More information about the llvm-commits
mailing list