]> granicus.if.org Git - clang/commit
Reduce ASTMatchers stack footprint. Addresses http://llvm.org/PR38851
authorAlexander Kornienko <alexfh@google.com>
Tue, 15 Jan 2019 15:34:26 +0000 (15:34 +0000)
committerAlexander Kornienko <alexfh@google.com>
Tue, 15 Jan 2019 15:34:26 +0000 (15:34 +0000)
commit22a4e7a8e6e900c9c9fab3daf177305552a398b5
tree481b11923b26333cd660a682a6c56bb39fcb87b5
parent83abccf8fd42fb0136b6e406e2546adfa3b6e8c1
Reduce ASTMatchers stack footprint. Addresses http://llvm.org/PR38851

The BoundNodesTreeBuilder class is used both directly and indirectly as a local
variable in matchesAncestorOfRecursively, memoizedMatchesAncestorOfRecursively
and other functions that happen to be on long recursive call paths. By reducing
the inline storage size of the SmallVector we dramatically reduce the stack
requirements of ASTMatchers. Running clang-tidy with a large number of checks
enabled on a few arbitrarily chosen files show no performance regression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351196 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/ASTMatchers/ASTMatchersInternal.h