[PATCH] Refactor VariantMatcher::MatcherOps to reduce the amount of generated code.
Samuel Benzaquen
sbenza at google.com
Fri Aug 29 09:47:30 PDT 2014
Hi klimek,
Refactor VariantMatcher::MatcherOps to reduce the amount of generated code.
- Use a manually generated vtable instead of virtual method.
- Make some code type agnostic and move it to the cpp file.
- Return a void* instead of storing the object in MatcherOps. The
caller already knows the real type.
This change reduces the number of symbols generated in Registry.cpp by
~18% and the compilation time (in non-release mode) by ~20%.
http://reviews.llvm.org/D5124
Files:
include/clang/ASTMatchers/ASTMatchersInternal.h
include/clang/ASTMatchers/Dynamic/VariantValue.h
lib/ASTMatchers/ASTMatchersInternal.cpp
lib/ASTMatchers/Dynamic/VariantValue.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5124.13095.patch
Type: text/x-patch
Size: 11642 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140829/4c10e80a/attachment.bin>
More information about the cfe-commits
mailing list