This is an archive of the discontinued LLVM Phabricator instance.

[AST] Re-add TypeLocs and NestedNameSpecifierLocs to the ParentMap.
ClosedPublic

Authored by bkramer on Oct 23 2015, 1:25 AM.

Details

Summary

This relands r250831 after some fixes to shrink the ParentMap overall
with one addtional tweak: nodes with pointer identity (e.g. Decl* and
friends) can be store more efficiently so I put them in a separate map.
All other nodes (so far only TypeLoc and NNSLoc) go in a different map
keyed on DynTypedNode. This further uglifies the code but significantly
reduces memory overhead.

Overall this change still make ParentMap significantly larger but it's
nowhere as bad as before. I see about 25 MB over baseline (pre-r251008)
on X86ISelLowering.cpp. If this becomes an issue we could consider
splitting the maps further as DynTypedNode is still larger (32 bytes)
than a single TypeLoc (16 bytes) but I didn't want to introduce even
more complexity now.

Diff Detail

Event Timeline

bkramer updated this revision to Diff 38216.Oct 23 2015, 1:25 AM
bkramer retitled this revision from to [AST] Re-add TypeLocs and NestedNameSpecifierLocs to the ParentMap..
bkramer updated this object.
bkramer added reviewers: klimek, djasper.
bkramer added a subscriber: cfe-commits.
klimek accepted this revision.Oct 23 2015, 1:32 AM
klimek edited edge metadata.

lg; let's see whether it sticks this time :)

include/clang/AST/ASTContext.h
456

s/an/a/ (like user, unique begins with a 'y' sound)

This revision is now accepted and ready to land.Oct 23 2015, 1:32 AM
This revision was automatically updated to reflect the committed changes.