-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AST] Store Decl* and Stmt* directly into the ParentMap.
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. Differential Revision: http://reviews.llvm.org/D13976 llvm-svn: 251008
- Loading branch information
Showing
2 changed files
with
72 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters