[all-commits] [llvm/llvm-project] 5e6e40: [clang-tidy] Improve performance of google-runtime...
Piotr Zegar via All-commits
all-commits at lists.llvm.org
Tue Mar 26 12:19:45 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5e6e40fee31d5db2f44d604b0362e1e819f41ba5
https://github.com/llvm/llvm-project/commit/5e6e40fee31d5db2f44d604b0362e1e819f41ba5
Author: Piotr Zegar <me at piotrzegar.pl>
Date: 2024-03-26 (Tue, 26 Mar 2024)
Changed paths:
M clang-tools-extra/clang-tidy/google/IntegerTypesCheck.cpp
M clang-tools-extra/clang-tidy/google/IntegerTypesCheck.h
M clang-tools-extra/docs/ReleaseNotes.rst
Log Message:
-----------
[clang-tidy] Improve performance of google-runtime-int (#86596)
Main problem with performance of this check is caused by hasAncestor
matcher, and to be more precise by an llvm::DenseSet and std::deque in
matchesAnyAncestorOf.
To reduce impact of this matcher, multiple conditions that were checked
in check method were copied into AST matcher that is now checked before
hasAncestor.
Using custom getCheckTraversalKind to exclude template instances that
shouldn't be checked anyway is an additional improvement, but gain from
that one is low.
Tested on ffl_tests.cc, visible reduction from ~442 seconds to ~15
seconds (~96% reduction).
Closes #86553
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list