[PATCH] D46478: [Coverage] Take filenames into account when loading function records.
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 8 10:34:42 PDT 2018
vsk added inline comments.
================
Comment at: lib/ProfileData/Coverage/CoverageMapping.cpp:224
+ return Error::success();
+ }
----------------
Given that this should just be an optimization, it might be cheaper/simpler to use a map from the hash of the record's filenames to a set of stripped function names. This would preserve the proposed behavior where a record which introduces a duplicate symbol in at least one previously-unseen file is still loaded. Wdyt? I imagine something like `AlreadyLoaded = !RecordProvenance[hash_combine_range(Record.Filenames)].insert(OrigFuncName).second`. Hashing `OrigFuncName` might decrease the storage requirements even further.
Repository:
rL LLVM
https://reviews.llvm.org/D46478
More information about the llvm-commits
mailing list