[PATCH] D57986: [ProfileData] Remove non-determinism: Change DenseMap to MapVector
David Blaikie via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 14 11:46:13 PST 2019
dblaikie added a comment.
In D57986#1398271 <https://reviews.llvm.org/D57986#1398271>, @vsk wrote:
> I think this could roughly double the memory utilization of the writer, which might be problematic because the number of records to write can be high. (@dblaikie did some work on reducing memory usage in this area, he might have hard data about this.)
>
> As the write should only occur once, maybe the better tradeoff would be to sort?
Yeah, unless I'm missing something (quite possibly) this seems like the sort of place where "do a bunch of processing, then sort, then iterate" is a valid strategy.
@mgrang - does it look like any use case is emitting more than once & modifying in between? I would find that pretty surprising. I think it's just "build build build, stop building, emit" and adding a sort-before-emit would be OK there.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57986/new/
https://reviews.llvm.org/D57986
More information about the cfe-commits
mailing list