This is an archive of the discontinued LLVM Phabricator instance.

[clang] Increase the bitness of data length in ASTDeclContextNameLookup
AbandonedPublic

Authored by danlark on Feb 18 2021, 2:53 PM.

Details

Reviewers
rsmith
Summary

We faced the assert of too many declarations for serialized lookup for a very huge generated C++ target. We
think moving the type to uint32_t helps us. As I am not sure in the fix, please validate the correctness.

I don't have commit rights. Email: danilak@google.com. Name: Danila Kutenin.

Diff Detail

Event Timeline

danlark requested review of this revision.Feb 18 2021, 2:53 PM
danlark created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 18 2021, 2:53 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
danlark edited the summary of this revision. (Show Details)Feb 18 2021, 2:57 PM

Thanks for the diagnosis and the patch!

We spend a significant amount of our AST file size on these lookup tables, so I think the extra two bytes per lookup entry is best avoided if possible. We also have the same problem for other on-disk hash tables. I went ahead and generalized this to cover all of our on-disk hash tables and switched from fixed-width to variable-width encoding in rGe0589d70fb8e29842fab228df716f73b378710a6.

danlark abandoned this revision.Feb 19 2021, 12:17 AM

Thanks!