aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Tooling/CompilationDatabaseTest.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2018-08-28 15:42:08 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2018-08-28 15:42:08 +0000
commit6a92b5e1e2a608cfb726bdcd5b043aee2cc350c5 (patch)
tree3d074ae60a147e8c1e91d322ba745b3131c80be3 /clang/unittests/Tooling/CompilationDatabaseTest.cpp
parenta294dfa8371b4f422d8bd90a33d0e19fc16938ea (diff)
downloadllvm-6a92b5e1e2a608cfb726bdcd5b043aee2cc350c5.zip
llvm-6a92b5e1e2a608cfb726bdcd5b043aee2cc350c5.tar.gz
llvm-6a92b5e1e2a608cfb726bdcd5b043aee2cc350c5.tar.bz2
[TableGen] CodeGenDAGPatterns::GenerateVariants - basic caching of matching predicates
CodeGenDAGPatterns::GenerateVariants is a costly function in many tblgen commands (33.87% of the total runtime of x86 -gen-dag-isel), and due to the O(N^2) nature of the function, there are a high number of repeated comparisons of the pattern's vector<Predicate>. This initial patch at least avoids repeating these comparisons for every Variant in a pattern. I began investigating caching all the matches before entering the loop but hit issues with how best to store the data and how to update the cache as patterns were added. Saves around 15secs in debug builds of x86 -gen-dag-isel. Differential Revision: https://reviews.llvm.org/D51035 llvm-svn: 340837
Diffstat (limited to 'clang/unittests/Tooling/CompilationDatabaseTest.cpp')
0 files changed, 0 insertions, 0 deletions