[PATCH] Make the function pointer a template argument instead of a runtime value.

Samuel Benzaquen sbenza at google.com
Wed Nov 26 11:56:34 PST 2014


Hi klimek,

Speed up the variadic matchers by removing one indirect call.
Making the function pointer a template arguments allows the compiler to
inline the call instead of doing an runtime call by pointer.
Also, optimize the allOf() case to avoid redundant kind checks.
This speeds up our clang-tidy benchmark by ~2%

http://reviews.llvm.org/D6424

Files:
  lib/ASTMatchers/ASTMatchersInternal.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6424.16661.patch
Type: text/x-patch
Size: 3845 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141126/783d00f2/attachment.bin>


More information about the cfe-commits mailing list