[PATCH] Filter the toplevel matchers by kind.

Samuel Benzaquen sbenza at google.com
Fri Nov 21 12:41:02 PST 2014


Hi klimek,

Filter the toplevel matchers by kind.
Decl and Stmt matchers are tied to a specific node kind and trying to
match incompatible nodes is a waste.
Precalculate a filtered list of matchers that have a chance of matching
the node and ignore the rest.
Speeds up our clang-tidy benchmark by ~10%

http://reviews.llvm.org/D6361

Files:
  include/clang/AST/ASTTypeTraits.h
  include/clang/ASTMatchers/ASTMatchFinder.h
  include/clang/ASTMatchers/ASTMatchersInternal.h
  lib/ASTMatchers/ASTMatchFinder.cpp
  lib/ASTMatchers/ASTMatchersInternal.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6361.16506.patch
Type: text/x-patch
Size: 10143 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141121/674d7b09/attachment.bin>


More information about the cfe-commits mailing list