[PATCH] [clang] Optimized ASTNodeKind::isBaseOf

Alexander Kornienko alexfh at google.com
Thu Oct 2 04:39:38 PDT 2014


Hi klimek,

ASTNodeKind::isBaseOf shows in one of the top lines of the profile when
running a large clang-tidy benchmark. This rewrite reduces its total time from
6.1% to 3.7%:
<     11.06s  6.14% 13.29%     11.06s  6.14%: clang::ast_type_traits::ASTNodeKind::isBaseOf
>      5.75s  3.70% 10.35%      5.75s  3.70%: clang::ast_type_traits::ASTNodeKind::isBaseOf

http://reviews.llvm.org/D5577

Files:
  .gitignore
  include/clang/AST/ASTTypeTraits.h
  lib/AST/ASTTypeTraits.cpp
  lib/ASTMatchers/Dynamic/VariantValue.cpp
  unittests/AST/ASTTypeTraitsTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5577.14317.patch
Type: text/x-patch
Size: 5303 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141002/74ce4f30/attachment.bin>


More information about the cfe-commits mailing list