[PATCH] D13976: [AST] Store Decl* and Stmt* directly into the ParentMap.
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 22 03:36:57 PDT 2015
bkramer created this revision.
bkramer added reviewers: klimek, djasper.
bkramer added a subscriber: cfe-commits.
These are by far the most common types to be parents in the AST so it makes
sense to optimize for them. Put them directly into the value of the map.
This currently saves 32 bytes per parent in the map and a pointer
indirection at the cost of some additional complexity in the code.
Sadly this means we cannot return an ArrayRef from getParents anymore, add
a proxy class that can own a single DynTypedNode and otherwise behaves
exactly the same as ArrayRef.
For example on a random large file (X86ISelLowering.cpp) this reduces the size
of the parent map by 24 MB.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6100 bytes
Desc: not available
More information about the cfe-commits